summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ConfigureChecks.cmake8
-rw-r--r--config.h.cmake1
-rw-r--r--src/socket_wrapper.c4
3 files changed, 13 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index fb73449..ea0a208 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -119,6 +119,14 @@ check_prototype_definition(ioctl
"unistd.h;sys/ioctl.h"
HAVE_IOCTL_INT)
+if (HAVE_EVENTFD)
+ check_prototype_definition(eventfd
+ "int eventfd(unsigned int count, int flags)"
+ "-1"
+ "sys/eventfd.h"
+ HAVE_EVENTFD_UNSIGNED_INT)
+endif (HAVE_EVENTFD)
+
# IPV6
check_c_source_compiles("
#include <stdlib.h>
diff --git a/config.h.cmake b/config.h.cmake
index 466b951..8b66420 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -42,6 +42,7 @@
#cmakedefine HAVE_ACCEPT_PSOCKLEN_T 1
#cmakedefine HAVE_IOCTL_INT 1
+#cmakedefine HAVE_EVENTFD_UNSIGNED_INT 1
/*************************** LIBRARIES ***************************/
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 6a495b9..d5c343d 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -5024,7 +5024,11 @@ static int swrap_eventfd(int count, int flags)
return fd;
}
+#ifdef HAVE_EVENTFD_UNSIGNED_INT
+int eventfd(unsigned int count, int flags)
+#else
int eventfd(int count, int flags)
+#endif
{
return swrap_eventfd(count, flags);
}