From b3c6c94e88945ef6d673f6921a2a951824f49902 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 6 Jan 2017 04:54:14 +0200 Subject: [PATCH] Pthread_setname_np is a GNU extension --- source/core/unix/thread.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/core/unix/thread.cpp b/source/core/unix/thread.cpp index 3c17a9a..119d55f 100644 --- a/source/core/unix/thread.cpp +++ b/source/core/unix/thread.cpp @@ -22,8 +22,10 @@ void Thread::platform_launch() void Thread::platform_setname() { +#if defined(__GLIBC__) && (__GLIBC__>2 || (__GLIBC__==2 && __GLIBC_MINOR__>=12)) if(!name_.empty()) pthread_setname_np(priv_->handle, name_.c_str()); +#endif } } // namespace Msp -- 2.45.2