diff --git a/common/TracySystem.cpp b/common/TracySystem.cpp index 6837f4e2..3d2cac02 100644 --- a/common/TracySystem.cpp +++ b/common/TracySystem.cpp @@ -92,7 +92,7 @@ void SetThreadName( std::thread::native_handle_type handle, const char* name ) # ifdef _WIN32 data->id = GetThreadId( static_cast( handle ) ); # elif defined __APPLE__ - pthread_thread_id( handle, data->id ); + pthread_thread_id( handle, &data->id ); # else data->id = (uint64_t)handle; # endif diff --git a/common/TracySystem.hpp b/common/TracySystem.hpp index dd447b40..da2e0da6 100644 --- a/common/TracySystem.hpp +++ b/common/TracySystem.hpp @@ -26,7 +26,7 @@ static inline uint64_t GetThreadHandle() return uint64_t( GetCurrentThreadId() ); #elif defined __APPLE__ uint64_t id; - pthread_threadid_np( pthread_self(), id ); + pthread_threadid_np( pthread_self(), &id ); return id; #else static_assert( sizeof( decltype( pthread_self() ) ) <= sizeof( uint64_t ), "Thread handle too big to fit in protocol" );