From 5e33942864a842b8a4a19f12212a554c6d8028f1 Mon Sep 17 00:00:00 2001 From: Dominik Charousset Date: Sat, 22 Sep 2018 08:09:27 +0200 Subject: [PATCH] Fix BasicThread::SetOSName on FreeBSD --- src/threading/BasicThread.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/threading/BasicThread.cc b/src/threading/BasicThread.cc index 3b6f5d6532..f111028475 100644 --- a/src/threading/BasicThread.cc +++ b/src/threading/BasicThread.cc @@ -11,6 +11,10 @@ #include #endif +#ifdef __FreeBSD__ +#include +#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 }