Fei Jie | bbdd23c | 2016-04-08 15:59:14 +0800 | [diff] [blame] | 1 | #include "tests.h" |
2 | #include <sys/syscall.h> | ||||
3 | |||||
4 | #ifdef __NR_epoll_create | ||||
5 | |||||
6 | # include <errno.h> | ||||
7 | # include <stdio.h> | ||||
8 | # include <unistd.h> | ||||
9 | |||||
10 | int | ||||
11 | main(void) | ||||
12 | { | ||||
13 | int rc = syscall(__NR_epoll_create, -1); | ||||
14 | printf("epoll_create(-1) = %d %s (%m)\n", | ||||
15 | rc, errno == ENOSYS ? "ENOSYS" : "EINVAL"); | ||||
16 | |||||
17 | puts("+++ exited with 0 +++"); | ||||
18 | return 0; | ||||
19 | } | ||||
20 | |||||
21 | #else | ||||
22 | |||||
23 | SKIP_MAIN_UNDEFINED("__NR_epoll_creat") | ||||
24 | |||||
25 | #endif |