From d21040e3d8a84a57f5caee32c63f9fead77087cd Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 28 Oct 2017 12:16:52 +0200 Subject: [PATCH] pthread_{get,set}name_np is not standard. --- common/TracySystem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/TracySystem.cpp b/common/TracySystem.cpp index 194f6224..0ad8820c 100644 --- a/common/TracySystem.cpp +++ b/common/TracySystem.cpp @@ -52,7 +52,7 @@ void SetThreadName( std::thread::native_handle_type handle, const char* name ) { } # endif -#else +#elif defined _GNU_SOURCE const auto sz = strlen( name ); if( sz <= 15 ) { @@ -86,7 +86,7 @@ const char* GetThreadName( uint64_t id ) } } # endif -#else +#elif defined _GNU_SOURCE if( pthread_getname_np( (pthread_t)id, buf, 256 ) == 0 ) { return buf;