diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | configure.in | 8 | ||||
-rw-r--r-- | select.c | 7 |
3 files changed, 17 insertions, 1 deletions
@@ -21,7 +21,8 @@ Changes in 2.0.3-alpha: o Do not detect whether we have monotonic clock support every time a new event base is created: instead do it only once. Patch taken from Chromium. o Do not allocate the maximum event queue for the epoll backend at startup. Instead, start out accepting 32 events at a time, and double the queue's size when it seems that the OS is generating events faster than we're requesting them. Saves up to 374K per epoll-based event_base. Resolves bug 2839240. o Treat an event with a negative fd as valid but untriggerable by Libevent. This is useful for applications that want to manually activate events. - + o Fix compilation on Android, which forgot to define fd_mask in its sys/select.h + Changes in 2.0.2-alpha: o Add a new flag to bufferevents to make all callbacks automatically deferred. diff --git a/configure.in b/configure.in index 8b7ed008..977646dd 100644 --- a/configure.in +++ b/configure.in @@ -352,6 +352,14 @@ AC_CHECK_TYPES([uint64_t, uint32_t, uint16_t, uint8_t], , , #include <sys/types.h> #endif]) +AC_CHECK_TYPES([fd_mask], , , +[#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif +#ifdef HAVE_SELECT_H +#include <select.h> +#endif]) + AC_CHECK_SIZEOF(long long) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(int) @@ -57,6 +57,13 @@ #define howmany(x, y) (((x)+((y)-1))/(y)) #endif +#ifndef _EVENT_HAVE_FD_MASK +/* This type is mandatory, but Android doesn't define it. */ +#undef NFDBITS +#define NFDBITS (sizeof(long)*8) +typedef unsigned long fd_mask; +#endif + struct selectop { int event_fds; /* Highest fd in fd set */ int event_fdsz; |