summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/events/config.m428
-rw-r--r--source4/lib/events/events_aio.c2
-rw-r--r--source4/lib/events/events_epoll.c2
-rw-r--r--source4/lib/replace/libreplace.m43
-rw-r--r--source4/lib/replace/system/select.h9
5 files changed, 15 insertions, 29 deletions
diff --git a/source4/lib/events/config.m4 b/source4/lib/events/config.m4
index 8c61f7ed42..b23407baed 100644
--- a/source4/lib/events/config.m4
+++ b/source4/lib/events/config.m4
@@ -1,19 +1,17 @@
-AC_CHECK_HEADERS(sys/epoll.h)
-
-# check for native Linux AIO interface
-SMB_ENABLE(EVENTS_AIO, NO)
-AC_CHECK_HEADERS(libaio.h)
-AC_CHECK_LIB_EXT(aio, AIO_LIBS, io_getevents)
-if test x"$ac_cv_header_libaio_h" = x"yes" -a x"$ac_cv_lib_ext_aio_io_getevents" = x"yes";then
- SMB_ENABLE(EVENTS_AIO,YES)
- AC_DEFINE(HAVE_LINUX_AIO, 1, [Whether Linux AIO is available])
-fi
-SMB_EXT_LIB(LIBAIO_LINUX, $AIO_LIBS)
-
-# check for native Linux AIO interface
+# check for EPOLL and native Linux AIO interface
SMB_ENABLE(EVENTS_EPOLL, NO)
+SMB_ENABLE(EVENTS_AIO, NO)
AC_CHECK_HEADERS(sys/epoll.h)
-if test x"$ac_cv_header_sys_epoll_h" = x"yes";then
+AC_CHECK_FUNCS(epoll_create)
+if test x"$ac_cv_header_sys_epoll_h" = x"yes" -a x"$ac_cv_func_epoll_create" = x"yes";then
SMB_ENABLE(EVENTS_EPOLL,YES)
-fi
+ # check for native Linux AIO interface
+ AC_CHECK_HEADERS(libaio.h)
+ AC_CHECK_LIB_EXT(aio, AIO_LIBS, io_getevents)
+ if test x"$ac_cv_header_libaio_h" = x"yes" -a x"$ac_cv_lib_ext_aio_io_getevents" = x"yes";then
+ SMB_ENABLE(EVENTS_AIO,YES)
+ AC_DEFINE(HAVE_LINUX_AIO, 1, [Whether Linux AIO is available])
+ fi
+ SMB_EXT_LIB(LIBAIO_LINUX, $AIO_LIBS)
+fi
diff --git a/source4/lib/events/events_aio.c b/source4/lib/events/events_aio.c
index 52ddadfc52..6d9dd6d753 100644
--- a/source4/lib/events/events_aio.c
+++ b/source4/lib/events/events_aio.c
@@ -33,10 +33,10 @@
#include "includes.h"
#include "system/filesys.h"
-#include "system/select.h" /* needed for WITH_EPOLL */
#include "lib/util/dlinklist.h"
#include "lib/events/events.h"
#include "lib/events/events_internal.h"
+#include <sys/epoll.h>
#include <libaio.h>
#define MAX_AIO_QUEUE_DEPTH 100
diff --git a/source4/lib/events/events_epoll.c b/source4/lib/events/events_epoll.c
index cd894d8dff..f69b5bc6f4 100644
--- a/source4/lib/events/events_epoll.c
+++ b/source4/lib/events/events_epoll.c
@@ -23,10 +23,10 @@
#include "includes.h"
#include "system/filesys.h"
-#include "system/select.h" /* needed for WITH_EPOLL */
#include "lib/util/dlinklist.h"
#include "lib/events/events.h"
#include "lib/events/events_internal.h"
+#include <sys/epoll.h>
struct epoll_event_context {
/* a pointer back to the generic event_context */
diff --git a/source4/lib/replace/libreplace.m4 b/source4/lib/replace/libreplace.m4
index b63c0fd471..dff6098297 100644
--- a/source4/lib/replace/libreplace.m4
+++ b/source4/lib/replace/libreplace.m4
@@ -63,9 +63,6 @@ AC_CHECK_FUNCS(pipe strftime srandom random srand rand usleep setbuffer lstat ge
AC_CHECK_HEADERS(stdbool.h sys/select.h)
-AC_CHECK_HEADERS(sys/epoll.h)
-AC_CHECK_FUNCS(epoll_create)
-
AC_CHECK_TYPE(bool,
[AC_DEFINE(HAVE_BOOL, 1, [Whether the bool type is available])],,
[
diff --git a/source4/lib/replace/system/select.h b/source4/lib/replace/system/select.h
index 0d1eabbc35..20346259c2 100644
--- a/source4/lib/replace/system/select.h
+++ b/source4/lib/replace/system/select.h
@@ -30,13 +30,4 @@
#define SELECT_CAST
#endif
-/* use epoll if it is available */
-#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_SYS_EPOLL_H)
-#define WITH_EPOLL 1
-#endif
-
-#if WITH_EPOLL
-#include <sys/epoll.h>
-#endif
-
#endif