mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Fix BasicThread::SetOSName on FreeBSD
This commit is contained in:
parent
f7da111d1c
commit
5e33942864
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue