Skip to content

Commit

Permalink
asterisk-16.x: allow eventfd detection
Browse files Browse the repository at this point in the history
Asterisk 16 wants to use eventfd, but it doesn't allow the detection
during cross-compiling. This results in runtime warnings, for instance
when shutting down:

  [Mar  2 22:37:41] WARNING[21593]: alertpipe.c:112 ast_alertpipe_read: read() failed: Bad file descriptor
  [Mar  2 22:37:41] WARNING[21593]: alertpipe.c:112 ast_alertpipe_read: read() failed: Bad file descriptor
  [Mar  2 22:37:41] WARNING[21593]: alertpipe.c:112 ast_alertpipe_read: read() failed: Bad file descriptor

Relax the configure script so that eventfd can also be detected when
cross-compiling.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
  • Loading branch information
micmac1 committed Apr 21, 2019
1 parent 7733094 commit f267424
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions net/asterisk-16.x/patches/130-eventfd.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/configure.ac
+++ b/configure.ac
@@ -1189,7 +1189,7 @@ if test "${ac_cv_have_variable_fdset}x"
fi

AC_MSG_CHECKING([if we have usable eventfd support])
-AC_RUN_IFELSE(
+AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <sys/eventfd.h>],
[return eventfd(0, EFD_NONBLOCK | EFD_SEMAPHORE) == -1;])],
AC_MSG_RESULT(yes)

0 comments on commit f267424

Please sign in to comment.