summaryrefslogtreecommitdiffstats
path: root/config.tests/unix/cloexec/cloexec.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-06-29 10:10:22 +0200
committerLiang Qi <liang.qi@qt.io>2016-06-29 10:10:22 +0200
commitf27d8b9f570e7fe5eab527ea13ed8bc3ec172702 (patch)
treed84389d3c2a37b38435e0be5259f48e5f04290e0 /config.tests/unix/cloexec/cloexec.cpp
parenta8c98dcb89f2b3f8438555d8febe17d3542d0567 (diff)
parent0d720a000f4f35c5ea6942426efec6847b06f4ce (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
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 2cd62c925d..cc6948a280 100644
--- a/config.tests/unix/cloexec/cloexec.cpp
+++ b/config.tests/unix/cloexec/cloexec.cpp
@@ -50,6 +50,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;
}