summaryrefslogtreecommitdiff
path: root/Libraries/LibCore/LocalServer.cpp
diff options
context:
space:
mode:
authorMarcin Gasperowicz <xnooga@gmail.com>2020-05-29 22:22:01 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-30 00:36:13 +0200
commit9a4ee9aa1a6d947c720b5a550d1d5e81e715ba98 (patch)
tree0b8f7c4e6f5c03497468e43f0b4cc5b53dae5d80 /Libraries/LibCore/LocalServer.cpp
parent4e8de753c95a4741921c2f86e315b44ae07f88ff (diff)
downloadserenity-9a4ee9aa1a6d947c720b5a550d1d5e81e715ba98.zip
Lagom: Adjust AK, LibCore and LibTLS to build on MacOS
Diffstat (limited to 'Libraries/LibCore/LocalServer.cpp')
-rw-r--r--Libraries/LibCore/LocalServer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Libraries/LibCore/LocalServer.cpp b/Libraries/LibCore/LocalServer.cpp
index bd1c1e1a2e..a8ac87b961 100644
--- a/Libraries/LibCore/LocalServer.cpp
+++ b/Libraries/LibCore/LocalServer.cpp
@@ -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();