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

Lagom: Adjust AK, LibCore and LibTLS to build on MacOS

This commit is contained in:
Marcin Gasperowicz 2020-05-29 22:22:01 +02:00 committed by Andreas Kling
parent 4e8de753c9
commit 9a4ee9aa1a
3 changed files with 19 additions and 3 deletions

View file

@ -31,8 +31,9 @@
#include <sys/socket.h>
#include <sys/stat.h>
#include <unistd.h>
#ifndef SOCK_NONBLOCK
#include <sys/ioctl.h>
# include <sys/ioctl.h>
#endif
namespace Core {
@ -111,12 +112,13 @@ bool LocalServer::listen(const String& address)
fcntl(m_fd, F_SETFD, FD_CLOEXEC);
#endif
ASSERT(m_fd >= 0);
#ifndef __APPLE__
rc = fchmod(m_fd, 0600);
if (rc < 0) {
perror("fchmod");
ASSERT_NOT_REACHED();
}
#endif
auto socket_address = SocketAddress::local(address);
auto un = socket_address.to_sockaddr_un();