Pass only SOCK_* flags to accept4, as they are the only documented ones, and passing others may trigger EINVAL. * tests/test-accept4.c: (main): Pass SOCK_CLOEXEC instead of O_CLOEXEC | O_BINARY to accept4. --- ChangeLog | 7 +++++++ tests/test-accept4.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 02d8bf8..3601eda 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-10-08 Pino Toscano <ptosc...@redhat.com> + + Pass only SOCK_* flags to accept4, as they are the only documented + ones, and passing others may trigger EINVAL. + * tests/test-accept4.c: (main): Pass SOCK_CLOEXEC instead of + O_CLOEXEC | O_BINARY to accept4. + 2015-10-06 Pavel Raiskup <prais...@redhat.com> gnulib-tool: fix tests of 'extensions' module diff --git a/tests/test-accept4.c b/tests/test-accept4.c index b24af0b..b2e6fa8 100644 --- a/tests/test-accept4.c +++ b/tests/test-accept4.c @@ -43,7 +43,7 @@ main (void) errno = 0; ASSERT (accept4 (-1, (struct sockaddr *) &addr, &addrlen, - O_CLOEXEC | O_BINARY) + SOCK_CLOEXEC) == -1); ASSERT (errno == EBADF); } @@ -54,7 +54,7 @@ main (void) close (99); errno = 0; ASSERT (accept4 (99, (struct sockaddr *) &addr, &addrlen, - O_CLOEXEC | O_BINARY) + SOCK_CLOEXEC) == -1); ASSERT (errno == EBADF); } -- 2.1.0