eventfd.c revision 857adac3a5384fff0426f7b2572eeca16e8c5803
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#include <fcntl.h>
6#include <unistd.h>
7#include <sys/syscall.h>
8
9int
10main(void)
11{
12#if defined __NR_eventfd2 && defined O_CLOEXEC
13	(void) close(0);
14	return syscall(__NR_eventfd2, -1L, 1 | O_CLOEXEC | O_NONBLOCK) == 0 ?
15		0 : 77;
16#else
17        return 77;
18#endif
19}
20