1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:58:11 +00:00

LibCore: Enable file descriptor passing on OpenBSD

This commit is contained in:
nipos 2023-01-14 16:28:27 +01:00 committed by Linus Groh
parent 4a816ed891
commit bfacbe1e0d

View file

@ -579,7 +579,7 @@ ErrorOr<int> LocalSocket::receive_fd(int flags)
{
#if defined(AK_OS_SERENITY)
return Core::System::recvfd(m_helper.fd(), flags);
#elif defined(AK_OS_LINUX) || defined(AK_OS_MACOS) || defined(AK_OS_FREEBSD)
#elif defined(AK_OS_LINUX) || defined(AK_OS_MACOS) || defined(AK_OS_FREEBSD) || defined(AK_OS_OPENBSD)
union {
struct cmsghdr cmsghdr;
char control[CMSG_SPACE(sizeof(int))];
@ -620,7 +620,7 @@ ErrorOr<void> LocalSocket::send_fd(int fd)
{
#if defined(AK_OS_SERENITY)
return Core::System::sendfd(m_helper.fd(), fd);
#elif defined(AK_OS_LINUX) || defined(AK_OS_MACOS) || defined(AK_OS_FREEBSD)
#elif defined(AK_OS_LINUX) || defined(AK_OS_MACOS) || defined(AK_OS_FREEBSD) || defined(AK_OS_OPENBSD)
char c = 'F';
struct iovec iov {
.iov_base = &c,