aboutsummaryrefslogtreecommitdiff
path: root/databases/mongodb50/files/patch-src_mongo_platform_process__id.cpp
diff options
context:
space:
mode:
authorKoichiro Iwao <meta@FreeBSD.org>2021-06-14 05:03:13 +0000
committerKoichiro Iwao <meta@FreeBSD.org>2021-06-14 05:06:56 +0000
commit58f4100c0c7d4a16b3806a3f1ec6bc76edfe6ffb (patch)
tree4a2752ac06930d157737b137b657d24a3b64221b /databases/mongodb50/files/patch-src_mongo_platform_process__id.cpp
parent2fdaba349b7256b7053a3ae84f3af40a404cf457 (diff)
Diffstat (limited to 'databases/mongodb50/files/patch-src_mongo_platform_process__id.cpp')
-rw-r--r--databases/mongodb50/files/patch-src_mongo_platform_process__id.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/databases/mongodb50/files/patch-src_mongo_platform_process__id.cpp b/databases/mongodb50/files/patch-src_mongo_platform_process__id.cpp
new file mode 100644
index 000000000000..11f61a36ca08
--- /dev/null
+++ b/databases/mongodb50/files/patch-src_mongo_platform_process__id.cpp
@@ -0,0 +1,24 @@
+--- src/mongo/platform/process_id.cpp.orig 2021-03-26 23:29:14 UTC
++++ src/mongo/platform/process_id.cpp
+@@ -35,6 +35,10 @@
+ #include <pthread.h>
+ #endif
+
++#if defined(__FreeBSD__)
++#include <pthread_np.h>
++#endif
++
+ #if defined(__linux__)
+ #include <sys/syscall.h>
+ #include <sys/types.h>
+@@ -72,6 +76,10 @@ inline NativeProcessId getCurrentNativeThreadId() {
+ uint64_t tid;
+ invariant(::pthread_threadid_np(NULL, &tid) == 0);
+ return tid;
++}
++#elif __FreeBSD__
++inline NativeProcessId getCurrentNativeThreadId() {
++ return pthread_getthreadid_np();
+ }
+ #else
+ inline NativeProcessId getCurrentNativeThreadId() {