Merge pull request #401 from PhenomRetroShare/Fix_WindowsCompilationWithThreadName

Fix Compilation with unknown pthread_getname_np if not __USE_GNU defined
This commit is contained in:
Cyril Soler 2016-06-02 20:36:51 -04:00
commit 5362fd3413

View File

@ -164,6 +164,7 @@ void RsThread::start(const std::string &threadName)
mTid = tid;
// set name
#ifdef __USE_GNU
if(!threadName.empty()) {
// thread names are restricted to 16 characters including the terminating null byte
if(threadName.length() > 15)
@ -176,6 +177,7 @@ void RsThread::start(const std::string &threadName)
pthread_setname_np(mTid, threadName.c_str());
}
}
#endif
}
else
{