aboutsummaryrefslogtreecommitdiff
path: root/profiling/common/include/NetworkSockets.hpp
diff options
context:
space:
mode:
authorJim Flynn <jim.flynn@arm.com>2020-07-14 14:26:27 +0100
committerJim Flynn <jim.flynn@arm.com>2020-07-14 16:12:12 +0000
commit6da6a45d09ac8d7ea956c09ba241c9e0840ecb25 (patch)
tree0b3a85aef2b5d03e036c60e344188ae1c5057849 /profiling/common/include/NetworkSockets.hpp
parentbac9b35df7c59f6b5b61e1d233a49bdb88a973ba (diff)
downloadarmnn-6da6a45d09ac8d7ea956c09ba241c9e0840ecb25.tar.gz
Make it build on MACOSX
Still need to explicitly defined -DCMAKE_CXX_FLAGS=--std=c++14 which that flags should goes into CMakefile.txt JF: Fixed merge failure by removing Filesystem.cpp and updated the copyright headers to new standard Change-Id: I6d0886bd86bc1ddb593028194852551d43c77745 Signed-off-by: Keith Mok <ek9852@gmail.com> Signed-off-by: Jim Flynn <jim.flynn@arm.com>
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;