mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-15 12:13:24 +00:00
use correct function from free bsd pthread
This commit is contained in:
parent
e0d8e34369
commit
4206132ea1
@ -21,15 +21,16 @@ namespace llarp
|
||||
const int rc = pthread_setname_np(name.c_str());
|
||||
#else
|
||||
#ifdef __FreeBSD__
|
||||
pthread_setname_np(pthread_self(), name.c_str());
|
||||
const int rc = pthread_setname_np(pthread_self(), name.c_str(), nullptr);
|
||||
#else
|
||||
const int rc = pthread_setname_np(pthread_self(), name.c_str());
|
||||
#endif
|
||||
if(rc)
|
||||
{
|
||||
LogError("Failed to set thread name to ", name, " errno = ", rc,
|
||||
" errstr = ", strerror(rc));
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#else
|
||||
LogInfo("Thread name setting not supported on this platform");
|
||||
|
Loading…
Reference in New Issue
Block a user