port uloop to BSD kqueue
[oweals/libubox.git] / uloop.h
diff --git a/uloop.h b/uloop.h
index f84050ab5c15d34962583fe48fb10f5e080c00a3..35ee3a5e4c71dfa787aa73a7eaa6894db7e9ad90 100644 (file)
--- a/uloop.h
+++ b/uloop.h
 
 #include <sys/time.h>
 #include <stdbool.h>
+#include <stdint.h>
+
+#if defined(__APPLE__) || defined(__FreeBSD__)
+#define USE_KQUEUE
+#else
+#define USE_EPOLL
+#endif
 
 struct uloop_fd;
 struct uloop_timeout;
@@ -40,6 +47,9 @@ struct uloop_fd
        bool eof;
        bool error;
        bool registered;
+#ifdef USE_KQUEUE
+       uint8_t kqflags;
+#endif
 };
 
 struct uloop_timeout