Created
October 30, 2015 15:37
-
-
Save shulima/95d305e80a539662de61 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tests/test-accept4.c b/tests/test-accept4.c | |
index b24af0b..e900b48 100644 | |
--- a/tests/test-accept4.c | |
+++ b/tests/test-accept4.c | |
@@ -31,6 +31,10 @@ SIGNATURE_CHECK (accept4, int, (int, struct sockaddr *, socklen_t *, int)); | |
#include "macros.h" | |
+#ifndef SOCK_CLOEXEC | |
+# define SOCK_CLOEXEC 0 | |
+#endif | |
+ | |
int | |
main (void) | |
{ | |
@@ -43,7 +47,7 @@ main (void) | |
errno = 0; | |
ASSERT (accept4 (-1, (struct sockaddr *) &addr, &addrlen, | |
- O_CLOEXEC | O_BINARY) | |
+ SOCK_CLOEXEC) | |
== -1); | |
ASSERT (errno == EBADF); | |
} | |
@@ -54,7 +58,7 @@ main (void) | |
close (99); | |
errno = 0; | |
ASSERT (accept4 (99, (struct sockaddr *) &addr, &addrlen, | |
- O_CLOEXEC | O_BINARY) | |
+ SOCK_CLOEXEC) | |
== -1); | |
ASSERT (errno == EBADF); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment