From 6da6a45d09ac8d7ea956c09ba241c9e0840ecb25 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Tue, 14 Jul 2020 14:26:27 +0100 Subject: 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 Signed-off-by: Jim Flynn --- profiling/common/include/NetworkSockets.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'profiling/common/include') 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 #include #include @@ -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; -- cgit v1.2.1