aboutsummaryrefslogtreecommitdiff
path: root/multimedia/obs-studio/files/patch-libobs_util_threading-posix.c
blob: e7ac5063f20e2f038c3a285023d31dba7a941675 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- libobs/util/threading-posix.c.orig	2015-03-27 21:29:37 UTC
+++ libobs/util/threading-posix.c
@@ -26,6 +26,10 @@
 #include <semaphore.h>
 #endif
 
+#if defined(__FreeBSD__)
+#include <pthread_np.h>
+#endif
+
 #include "bmem.h"
 #include "threading.h"
 
@@ -256,6 +260,8 @@ void os_set_thread_name(const char *name
 {
 #if defined(__APPLE__)
 	pthread_setname_np(name);
+#elif defined(__FreeBSD__)
+	pthread_set_name_np(pthread_self(), name);
 #elif !defined(__MINGW32__)
 	pthread_setname_np(pthread_self(), name);
 #endif