diff --git a/common/TracySocket.cpp b/common/TracySocket.cpp index e1e85100..c6bf9dc8 100644 --- a/common/TracySocket.cpp +++ b/common/TracySocket.cpp @@ -82,7 +82,7 @@ bool Socket::Connect( const char* addr, const char* port ) for( ptr = res; ptr; ptr = ptr->ai_next ) { if( ( sock = socket( ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol ) ) == -1 ) continue; -#if defined __MACOSX__ || defined __IPHONE__ +#if defined __APPLE__ int val = 1; setsockopt( m_sock, SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof( val ) ); #endif @@ -251,7 +251,7 @@ Socket* ListenSocket::Accept() if( FD_ISSET( m_sock, &fds ) ) { int sock = accept( m_sock, (sockaddr*)&remote, &sz); -#if defined __MACOSX__ || defined __IPHONE__ +#if defined __APPLE__ int val = 1; setsockopt( m_sock, SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof( val ) ); #endif diff --git a/common/TracySystem.cpp b/common/TracySystem.cpp index 2c475cd3..6837f4e2 100644 --- a/common/TracySystem.cpp +++ b/common/TracySystem.cpp @@ -91,7 +91,7 @@ void SetThreadName( std::thread::native_handle_type handle, const char* name ) auto data = (ThreadNameData*)tracy_malloc( sizeof( ThreadNameData ) ); # ifdef _WIN32 data->id = GetThreadId( static_cast( handle ) ); -# elif defined __MACOSX__ || defined __IPHONE__ +# elif defined __APPLE__ pthread_thread_id( handle, data->id ); # else data->id = (uint64_t)handle; diff --git a/common/TracySystem.hpp b/common/TracySystem.hpp index c5a466c4..dd447b40 100644 --- a/common/TracySystem.hpp +++ b/common/TracySystem.hpp @@ -2,7 +2,7 @@ #define __TRACYSYSTEM_HPP__ #ifdef TRACY_ENABLE -# if defined __ANDROID__ || defined __CYGWIN__ || defined __MACOSX__ || defined __IPHONE__ +# if defined __ANDROID__ || defined __CYGWIN__ || defined __APPLE__ # define TRACY_COLLECT_THREAD_NAMES # endif #endif @@ -24,7 +24,7 @@ static inline uint64_t GetThreadHandle() #ifdef _WIN32 static_assert( sizeof( decltype( GetCurrentThreadId() ) ) <= sizeof( uint64_t ), "Thread handle too big to fit in protocol" ); return uint64_t( GetCurrentThreadId() ); -#elif defined __MACOSX__ || defined __IPHONE__ +#elif defined __APPLE__ uint64_t id; pthread_threadid_np( pthread_self(), id ); return id;