]> git.tdb.fi Git - libs/core.git/commitdiff
Pthread_setname_np is a GNU extension
authorMikko Rasa <tdb@tdb.fi>
Fri, 6 Jan 2017 02:54:14 +0000 (04:54 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 6 Jan 2017 02:54:14 +0000 (04:54 +0200)
source/core/unix/thread.cpp

index 3c17a9aabc8054c423253c115ba803325dc3de62..119d55f0571600a4b57de1bd1fea054acc1fb9d2 100644 (file)
@@ -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