mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibCore: Make Core::System::{send,recv}fd work on macOS
All the required bits were already there. Also, this would probably work on FreeBSD without modification but I don't currently have a system to test this on.
This commit is contained in:
parent
35809ef400
commit
400cc41176
Notes:
sideshowbarker
2024-07-17 06:10:48 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/400cc41176 Pull-request: https://github.com/SerenityOS/serenity/pull/15503 Reviewed-by: https://github.com/linusg ✅
1 changed files with 2 additions and 2 deletions
|
@ -563,7 +563,7 @@ ErrorOr<int> LocalSocket::receive_fd(int flags)
|
||||||
{
|
{
|
||||||
#if defined(AK_OS_SERENITY)
|
#if defined(AK_OS_SERENITY)
|
||||||
return Core::System::recvfd(m_helper.fd(), flags);
|
return Core::System::recvfd(m_helper.fd(), flags);
|
||||||
#elif defined(AK_OS_LINUX)
|
#elif defined(AK_OS_LINUX) || defined(AK_OS_MACOS)
|
||||||
union {
|
union {
|
||||||
struct cmsghdr cmsghdr;
|
struct cmsghdr cmsghdr;
|
||||||
char control[CMSG_SPACE(sizeof(int))];
|
char control[CMSG_SPACE(sizeof(int))];
|
||||||
|
@ -608,7 +608,7 @@ ErrorOr<void> LocalSocket::send_fd(int fd)
|
||||||
{
|
{
|
||||||
#if defined(AK_OS_SERENITY)
|
#if defined(AK_OS_SERENITY)
|
||||||
return Core::System::sendfd(m_helper.fd(), fd);
|
return Core::System::sendfd(m_helper.fd(), fd);
|
||||||
#elif defined(AK_OS_LINUX)
|
#elif defined(AK_OS_LINUX) || defined(AK_OS_MACOS)
|
||||||
char c = 'F';
|
char c = 'F';
|
||||||
struct iovec iov {
|
struct iovec iov {
|
||||||
.iov_base = &c,
|
.iov_base = &c,
|
||||||
|
|
Loading…
Reference in a new issue