net/SocketDescriptor: check HAVE_ACCEPT4
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user