strace/tests/epoll_wait.c
Dmitry V. Levin 6d44012cb5 Assume that sys/epoll.h exists
This header file was added in glibc-2.3.2,
so it's safe to assume its availability.

* configure.ac (AC_CHECK_HEADERS): Remove sys/epoll.h.
* epoll.c: Include <sys/epoll.h> unconditionally.
Compile [HAVE_SYS_EPOLL_H] code unconditionally.
* tests/epoll_ctl.c: Do not check for HAVE_SYS_EPOLL_H.
* tests/epoll_wait.c: Likewise.
2016-05-09 21:46:17 +00:00

28 lines
447 B
C

#include "tests.h"
#include <sys/syscall.h>
#ifdef __NR_epoll_wait
# include <stdio.h>
# include <sys/epoll.h>
# include <unistd.h>
int
main(void)
{
struct epoll_event *const ev = tail_alloc(sizeof(*ev));
long rc = syscall(__NR_epoll_wait, -1, ev, 1, -2);
printf("epoll_wait(-1, %p, 1, -2) = %ld %s (%m)\n",
ev, rc, errno2name());
puts("+++ exited with 0 +++");
return 0;
}
#else
SKIP_MAIN_UNDEFINED("__NR_epoll_wait")
#endif