summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/include/system/select.h8
-rw-r--r--source4/lib/events/events_standard.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/source4/include/system/select.h b/source4/include/system/select.h
index 2b800fd270..c0595492cd 100644
--- a/source4/include/system/select.h
+++ b/source4/include/system/select.h
@@ -28,3 +28,11 @@
#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
diff --git a/source4/lib/events/events_standard.c b/source4/lib/events/events_standard.c
index df2368af3e..974007b999 100644
--- a/source4/lib/events/events_standard.c
+++ b/source4/lib/events/events_standard.c
@@ -34,15 +34,6 @@
#include "lib/events/events.h"
#include "lib/events/events_internal.h"
-/* 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
-
struct std_event_context {
/* a pointer back to the generic event_context */
struct event_context *ev;
@@ -73,6 +64,7 @@ struct std_event_context {
static void std_event_loop_timer(struct std_event_context *std_ev);
+/* use epoll if it is available */
#if WITH_EPOLL
/*
called when a epoll call fails, and we should fallback