2 #if !defined(_FAKE_POLL_H) && !defined(HAVE_POLL)
15 #include <sys/select.h>
26 #if !defined(FD_SETSIZE)
27 # if !defined(OPEN_MAX)
28 # error cannot establish FD_SETSIZE
30 #define FD_SETSIZE OPEN_MAX
35 # define POLLIN 0x0001
36 # define POLLOUT 0x0004
37 # define POLLERR 0x0008
40 # define POLLNORM POLLIN
41 # define POLLPRI POLLIN
42 # define POLLRDNORM POLLIN
43 # define POLLRDBAND POLLIN
44 # define POLLWRNORM POLLOUT
45 # define POLLWRBAND POLLOUT
48 # define POLLHUP 0x0010
49 # define POLLNVAL 0x0020
61 # if !defined(POLLRDNORM) && !defined(POLLWRNORM)
62 # define POLLIN 0x0300
63 # define POLLOUT 0x0010
64 # define POLLERR 0x0001
65 # define POLLRDNORM 0x0100
66 # define POLLWRNORM 0x0010
77 int fakepoll(
struct pollfd fds[],
int nfds,
int timeout);