diff options
author | Max Kellermann <max@musicpd.org> | 2017-08-11 09:04:10 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-08-11 09:04:10 +0200 |
commit | e38c213ee09343f1081abd69eb10b281967e6ff5 (patch) | |
tree | bf822f9c137e8c1e1f49b7adcbbe4fc79f138646 /src/net | |
parent | 699f41e11430868093c4d09e5bd54607ad35caa2 (diff) |
net/SocketDescriptor: check HAVE_ACCEPT4
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/SocketDescriptor.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/SocketDescriptor.cxx b/src/net/SocketDescriptor.cxx index 6c31616b2..bc914ae93 100644 --- a/src/net/SocketDescriptor.cxx +++ b/src/net/SocketDescriptor.cxx @@ -58,7 +58,7 @@ SocketDescriptor::Close() SocketDescriptor SocketDescriptor::Accept() { -#if defined(__linux__) && !defined(__BIONIC__) && !defined(KOBO) +#ifdef HAVE_ACCEPT4 int connection_fd = ::accept4(Get(), nullptr, nullptr, SOCK_CLOEXEC); #else int connection_fd = ::accept(Get(), nullptr, nullptr); @@ -72,7 +72,7 @@ SocketDescriptor SocketDescriptor::AcceptNonBlock(StaticSocketAddress &address) const { address.SetMaxSize(); -#if defined(__linux__) && !defined(__BIONIC__) && !defined(KOBO) +#ifdef HAVE_ACCEPT4 int connection_fd = ::accept4(Get(), address, &address.size, SOCK_CLOEXEC|SOCK_NONBLOCK); #else |