* 'master' of https://github.com/Neverlord/bro:
  Fix BasicThread::SetOSName on FreeBSD
This commit is contained in:
Jon Siwek 2018-09-24 10:56:09 -05:00
commit c32b359e7e
3 changed files with 11 additions and 3 deletions

View file

@ -1,4 +1,8 @@
2.6-beta2-12 | 2018-09-24 10:56:09 -0500
* Fix BasicThread::SetOSName on FreeBSD (Dominik Charousset)
2.6-beta2-10 | 2018-09-21 13:29:15 -0500
* Fix some broken @TEST-REQUIRES in unit tests (Daniel Thayer)

View file

@ -1 +1 @@
2.6-beta2-10
2.6-beta2-12

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
}