Fix BasicThread::SetOSName on FreeBSD

This commit is contained in:
Dominik Charousset 2018-09-22 08:09:27 +02:00
parent f7da111d1c
commit 5e33942864

View file

@ -11,6 +11,10 @@
#include <sys/prctl.h>
#endif
#ifdef __FreeBSD__
#include <pthread_np.h>
#endif
using namespace threading;
static const int STD_FMT_BUF_LEN = 2048;
@ -60,8 +64,8 @@ void BasicThread::SetOSName(const char* arg_name)
pthread_setname_np(arg_name);
#endif
#ifdef FREEBSD
pthread_set_name_np(thread.native_handle(), arg_name, arg_name);
#ifdef __FreeBSD__
pthread_set_name_np(thread.native_handle(), arg_name);
#endif
}