release
[hcoop/zz_old/debian/djbdns.git] / trypoll.c
1 #include <sys/types.h>
2 #include <fcntl.h>
3 #include <poll.h>
4
5 int main()
6 {
7 struct pollfd x;
8
9 x.fd = open("trypoll.c",O_RDONLY);
10 if (x.fd == -1) _exit(111);
11 x.events = POLLIN;
12 if (poll(&x,1,10) == -1) _exit(1);
13 if (x.revents != POLLIN) _exit(1);
14
15 /* XXX: try to detect and avoid poll() imitation libraries */
16
17 _exit(0);
18 }