mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
Fix Compilation with unknown pthread_getname_np if not __USE_GNU defined
This commit is contained in:
parent
65585658a5
commit
832fb78a2a
1 changed files with 12 additions and 10 deletions
|
@ -164,6 +164,7 @@ void RsThread::start(const std::string &threadName)
|
||||||
mTid = tid;
|
mTid = tid;
|
||||||
|
|
||||||
// set name
|
// set name
|
||||||
|
#ifdef __USE_GNU
|
||||||
if(!threadName.empty()) {
|
if(!threadName.empty()) {
|
||||||
// thread names are restricted to 16 characters including the terminating null byte
|
// thread names are restricted to 16 characters including the terminating null byte
|
||||||
if(threadName.length() > 15)
|
if(threadName.length() > 15)
|
||||||
|
@ -176,6 +177,7 @@ void RsThread::start(const std::string &threadName)
|
||||||
pthread_setname_np(mTid, threadName.c_str());
|
pthread_setname_np(mTid, threadName.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue