aboutsummaryrefslogtreecommitdiff
path: root/profiling/common/include/NetworkSockets.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'profiling/common/include/NetworkSockets.hpp')
-rw-r--r--profiling/common/include/NetworkSockets.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/profiling/common/include/NetworkSockets.hpp b/profiling/common/include/NetworkSockets.hpp
index b970424e10..05a45ae90b 100644
--- a/profiling/common/include/NetworkSockets.hpp
+++ b/profiling/common/include/NetworkSockets.hpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2020 Arm Ltd. All rights reserved.
+// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -10,7 +10,7 @@
#pragma once
-#if defined(__unix__)
+#if defined(__unix__) || defined(__APPLE__)
#include <poll.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
@@ -31,6 +31,12 @@ namespace Sockets
using Socket = int;
using PollFd = pollfd;
+#elif defined(__APPLE__)
+
+using Socket = int;
+using PollFd = pollfd;
+#define SOCK_CLOEXEC 0
+
#elif defined(_MSC_VER)
using Socket = SOCKET;