fix inet_pton
[musl.git] / include / poll.h
blob9a785307a39f1489550a53e08a0eab860ea98708
1 #ifndef _POLL_H
2 #define _POLL_H
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
8 #include <features.h>
10 #define POLLIN 0x001
11 #define POLLPRI 0x002
12 #define POLLOUT 0x004
13 #define POLLERR 0x008
14 #define POLLHUP 0x010
15 #define POLLNVAL 0x020
16 #define POLLRDNORM 0x040
17 #define POLLRDBAND 0x080
18 #define POLLWRNORM 0x100
19 #define POLLWRBAND 0x200
20 #define POLLMSG 0x400
21 #define POLLRDHUP 0x2000
23 typedef unsigned long nfds_t;
25 struct pollfd
27 int fd;
28 short events;
29 short revents;
32 int poll (struct pollfd *, nfds_t, int);
34 #ifdef _GNU_SOURCE
35 #define __NEED_time_t
36 #define __NEED_struct_timespec
37 #define __NEED_sigset_t
38 #include <bits/alltypes.h>
39 int ppoll(struct pollfd *, nfds_t, const struct timespec *, const sigset_t *);
40 #endif
42 #ifdef __cplusplus
44 #endif
46 #endif