From: Dmitry V. Levin Date: Tue, 26 Jul 2016 14:09:42 +0000 (+0000) Subject: tests: fix accept4.test on systems that lack SOCK_CLOEXEC definition X-Git-Tag: v4.13~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9d168f3cdfd06d7268f9a756fdb2336887773e92;p=strace tests: fix accept4.test on systems that lack SOCK_CLOEXEC definition * tests/accept4.c: Check that O_CLOEXEC is defined. Use O_CLOEXEC instead of SOCK_CLOEXEC. --- diff --git a/tests/accept4.c b/tests/accept4.c index d49eb244..d26e15c5 100644 --- a/tests/accept4.c +++ b/tests/accept4.c @@ -28,16 +28,17 @@ */ #include "tests.h" +#include -#ifdef HAVE_ACCEPT4 +#if defined HAVE_ACCEPT4 && defined O_CLOEXEC # define TEST_SYSCALL_NAME accept4 -# define SUFFIX_ARGS , SOCK_CLOEXEC +# define SUFFIX_ARGS , O_CLOEXEC # define SUFFIX_STR ", SOCK_CLOEXEC" # include "accept.c" #else -SKIP_MAIN_UNDEFINED("HAVE_ACCEPT4") +SKIP_MAIN_UNDEFINED("HAVE_ACCEPT4 && O_CLOEXEC") #endif