mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-07 10:28:32 +00:00
Actually check the return value of epoll_create to make sure it works.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
6
configure
vendored
6
configure
vendored
@@ -15636,7 +15636,11 @@ cat >>conftest.$ac_ext <<_ACEOF
|
||||
int
|
||||
main ()
|
||||
{
|
||||
epoll_create(10);
|
||||
int res = epoll_create(10);
|
||||
if (res < 0)
|
||||
return 1;
|
||||
close (res);
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -334,7 +334,11 @@ AST_C_DEFINE_CHECK([PTHREAD_RWLOCK_PREFER_WRITER_NP], [PTHREAD_RWLOCK_PREFER_WRI
|
||||
|
||||
AC_MSG_CHECKING(for working epoll support)
|
||||
AC_LINK_IFELSE(
|
||||
AC_LANG_PROGRAM([#include <sys/epoll.h>], [epoll_create(10);]),
|
||||
AC_LANG_PROGRAM([#include <sys/epoll.h>], [int res = epoll_create(10);
|
||||
if (res < 0)
|
||||
return 1;
|
||||
close (res);
|
||||
return 0;]),
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_EPOLL], 1, [Define to 1 if your system has working epoll support.]),
|
||||
AC_MSG_RESULT(no)
|
||||
|
||||
Reference in New Issue
Block a user