use correct function from free bsd pthread

This commit is contained in:
Jeff Becker 2019-07-10 18:03:52 -04:00
parent e0d8e34369
commit 4206132ea1
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

View File

@ -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");