aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-third__party_WebKit_Source_platform_wtf_ThreadingPthreads.cpp
blob: 973ba230e940d6077493d11923f051298a0ee1bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- third_party/WebKit/Source/platform/wtf/ThreadingPthreads.cpp.orig	2017-06-05 19:03:26 UTC
+++ third_party/WebKit/Source/platform/wtf/ThreadingPthreads.cpp
@@ -49,11 +49,15 @@
 #include <objc/objc-auto.h>
 #endif
 
-#if OS(LINUX)
+#if OS(LINUX) || OS(BSD)
 #include <sys/syscall.h>
 #endif
 
-#if OS(LINUX) || OS(ANDROID)
+#if OS(BSD)
+#include <pthread_np.h>
+#endif
+
+#if OS(LINUX) || OS(ANDROID) || OS(BSD)
 #include <unistd.h>
 #endif
 
@@ -66,6 +70,8 @@ ThreadIdentifier CurrentThreadSyscall() {
   return pthread_mach_thread_np(pthread_self());
 #elif OS(LINUX)
   return syscall(__NR_gettid);
+#elif OS(BSD)
+  return pthread_getthreadid_np();
 #elif OS(ANDROID)
   return gettid();
 #else