mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:27:35 +00:00
LibCore: Use accept instead of accept4 on Haiku
This commit is contained in:
parent
ee5b851f70
commit
0816bbe727
4 changed files with 6 additions and 6 deletions
|
@ -80,7 +80,7 @@ ErrorOr<NonnullOwnPtr<TCPSocket>> TCPServer::accept()
|
|||
VERIFY(m_listening);
|
||||
sockaddr_in in;
|
||||
socklen_t in_size = sizeof(in);
|
||||
#ifndef AK_OS_MACOS
|
||||
#if !defined(AK_OS_MACOS) && !defined(AK_OS_HAIKU)
|
||||
int accepted_fd = TRY(Core::System::accept4(m_fd, (sockaddr*)&in, &in_size, SOCK_NONBLOCK | SOCK_CLOEXEC));
|
||||
#else
|
||||
int accepted_fd = TRY(Core::System::accept(m_fd, (sockaddr*)&in, &in_size));
|
||||
|
@ -88,7 +88,7 @@ ErrorOr<NonnullOwnPtr<TCPSocket>> TCPServer::accept()
|
|||
|
||||
auto socket = TRY(TCPSocket::adopt_fd(accepted_fd));
|
||||
|
||||
#ifdef AK_OS_MACOS
|
||||
#if defined(AK_OS_MACOS) || defined(AK_OS_HAIKU)
|
||||
// FIXME: Ideally, we should let the caller decide whether it wants the
|
||||
// socket to be nonblocking or not, but there are currently places
|
||||
// which depend on this.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue