summaryrefslogtreecommitdiffstats
path: root/config.tests/unix/cloexec/cloexec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'config.tests/unix/cloexec/cloexec.cpp')
-rw-r--r--config.tests/unix/cloexec/cloexec.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/config.tests/unix/cloexec/cloexec.cpp b/config.tests/unix/cloexec/cloexec.cpp
index 3f127d8d3f..cbde307237 100644
--- a/config.tests/unix/cloexec/cloexec.cpp
+++ b/config.tests/unix/cloexec/cloexec.cpp
@@ -44,6 +44,10 @@ int main()
(void) pipe2(pipes, O_CLOEXEC | O_NONBLOCK);
(void) fcntl(0, F_DUPFD_CLOEXEC, 0);
(void) dup3(0, 3, O_CLOEXEC);
+#if defined(__NetBSD__)
+ (void) paccept(0, 0, 0, NULL, SOCK_CLOEXEC | SOCK_NONBLOCK);
+#else
(void) accept4(0, 0, 0, SOCK_CLOEXEC | SOCK_NONBLOCK);
+#endif
return 0;
}