diff options
author | Ralf Nolden <nolden@kde.org> | 2016-06-27 10:34:19 +0200 |
---|---|---|
committer | Ralf Nolden <nolden@kde.org> | 2016-06-28 05:49:18 +0000 |
commit | b3b2f502e9b499814a1e3b21e1b572e3ff1ba37b (patch) | |
tree | 03db9966160201198965078b4d00e296c1281332 /config.tests | |
parent | 1a96295755391b508ea37b4bfbb681ea15ed7559 (diff) |
NetBSD: use paccept() where accept4() is used
Where accept4() is used, NetBSD offers paccept() as a replacement function.
Modify check for using accept4() and use paccept() on NetBSD.
See http://netbsd.gw.com/cgi-bin/man-cgi?paccept++NetBSD-current
and http://reviews.llvm.org/D12485
Change-Id: I9b3ecba5f3afad6c357d3f7b8f89589bf313e273
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'config.tests')
-rw-r--r-- | config.tests/unix/cloexec/cloexec.cpp | 4 |
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; } |