diff --git a/threading.h b/threading.h index 81c577c..37de500 100755 --- a/threading.h +++ b/threading.h @@ -18,6 +18,9 @@ #ifdef __APPLE__ #include "os/darwin/DarwinSpecific.h" #endif +#ifdef __FreeBSD__ +#include +#endif namespace tgvoip{ class Mutex{ @@ -92,9 +95,9 @@ namespace tgvoip{ static void* ActualEntryPoint(void* arg){ Thread* self=reinterpret_cast(arg); if(self->name){ -#if !defined(__APPLE__) && !defined(__gnu_hurd__) +#if defined(__linux__) || defined(__FreeBSD__) pthread_setname_np(self->thread, self->name); -#elif !defined(__gnu_hurd__) +#elif defined(__APPLE__) pthread_setname_np(self->name); if(self->maxPriority){ DarwinSpecific::SetCurrentThreadPriority(DarwinSpecific::THREAD_PRIO_USER_INTERACTIVE);