2 * Copyright (c) 2015-2016 Dmitry V. Levin <ldv@altlinux.org>
5 * SPDX-License-Identifier: GPL-2.0-or-later
10 #include <asm/unistd.h>
12 #if defined __NR_epoll_create1 && defined O_CLOEXEC
20 long rc = syscall(__NR_epoll_create1, O_CLOEXEC);
21 printf("epoll_create1(EPOLL_CLOEXEC) = %s\n", sprintrc(rc));
23 rc = syscall(__NR_epoll_create1, O_CLOEXEC | O_NONBLOCK);
24 printf("epoll_create1(EPOLL_CLOEXEC|%#x) = %s\n",
25 O_NONBLOCK, sprintrc(rc));
27 puts("+++ exited with 0 +++");
33 SKIP_MAIN_UNDEFINED("__NR_epoll_create1 && O_CLOEXEC")