mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +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>
|
#include <sys/prctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
#include <pthread_np.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace threading;
|
using namespace threading;
|
||||||
|
|
||||||
static const int STD_FMT_BUF_LEN = 2048;
|
static const int STD_FMT_BUF_LEN = 2048;
|
||||||
|
@ -60,8 +64,8 @@ void BasicThread::SetOSName(const char* arg_name)
|
||||||
pthread_setname_np(arg_name);
|
pthread_setname_np(arg_name);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FREEBSD
|
#ifdef __FreeBSD__
|
||||||
pthread_set_name_np(thread.native_handle(), arg_name, arg_name);
|
pthread_set_name_np(thread.native_handle(), arg_name);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue