mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Fix compilation on Android: define fd_mask when it's missing.
svn:r1434
This commit is contained in:
parent
072ae5887e
commit
03a9da175a
@ -1,6 +1,7 @@
|
||||
Changes in 1.4.13-stable:
|
||||
o If the kernel tells us that there are a negative number of bytes to read from a socket, do not believe it. Fixes bug 2841177; found by Alexander Pronchenkov.
|
||||
o Do not allocate the maximum event queue and fd array 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 512K per epoll-based event_base. Resolves bug 2839240.
|
||||
o Fix compilation on Android, which forgot to define fd_mask in its sys/select.h
|
||||
|
||||
|
||||
Changes in 1.4.12-stable:
|
||||
|
@ -309,6 +309,14 @@ AC_CHECK_TYPES([uint64_t, uint32_t, uint16_t, uint8_t], , ,
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#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(int)
|
||||
AC_CHECK_SIZEOF(short)
|
||||
|
8
select.c
8
select.c
@ -51,6 +51,7 @@
|
||||
#endif
|
||||
|
||||
#include "event.h"
|
||||
#include "evutil.h"
|
||||
#include "event-internal.h"
|
||||
#include "evsignal.h"
|
||||
#include "log.h"
|
||||
@ -59,6 +60,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