mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Forward-port: fix android compilation
svn:r1435
This commit is contained in:
parent
2622e5ace2
commit
18fe400805
@ -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.
|
||||
|
@ -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)
|
||||
|
7
select.c
7
select.c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user