Dmitry V. Levin
c6782f144a
strace test suite is now provided under the terms of the GNU General Public License version 2 or later, see tests/COPYING for more details.
29 lines
484 B
C
29 lines
484 B
C
/*
|
|
* Copyright (c) 2015-2016 Dmitry V. Levin <ldv@altlinux.org>
|
|
* All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#include "tests.h"
|
|
#include <fcntl.h>
|
|
#include <unistd.h>
|
|
#include <asm/unistd.h>
|
|
|
|
#if defined __NR_eventfd2 && defined O_CLOEXEC
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
(void) close(0);
|
|
if (syscall(__NR_eventfd2, -1L, 1 | O_CLOEXEC | O_NONBLOCK))
|
|
perror_msg_and_skip("eventfd2");
|
|
return 0;
|
|
}
|
|
|
|
#else
|
|
|
|
SKIP_MAIN_UNDEFINED("__NR_eventfd2 && O_CLOEXEC")
|
|
|
|
#endif
|