summaryrefslogtreecommitdiff
path: root/www/firefox/files/patch-bug1252246
diff options
context:
space:
mode:
Diffstat (limited to 'www/firefox/files/patch-bug1252246')
-rw-r--r--www/firefox/files/patch-bug125224644
1 files changed, 44 insertions, 0 deletions
diff --git a/www/firefox/files/patch-bug1252246 b/www/firefox/files/patch-bug1252246
new file mode 100644
index 000000000000..429391f0dc15
--- /dev/null
+++ b/www/firefox/files/patch-bug1252246
@@ -0,0 +1,44 @@
+# Prefer PTHREAD_PROCESS_SHARED on FreeBSD 11.0 or later
+
+diff --git a/ipc/glue/CrossProcessMutex.h b/ipc/glue/CrossProcessMutex.h
+--- ipc/glue/CrossProcessMutex.h
++++ ipc/glue/CrossProcessMutex.h
+@@ -9,7 +9,7 @@
+ #include "base/process.h"
+ #include "mozilla/Mutex.h"
+
+-#if defined(OS_LINUX) || defined(XP_DARWIN)
++#if !defined(OS_WIN) && !defined(OS_NETBSD) && !defined(OS_OPENBSD)
+ #include <pthread.h>
+ #include "SharedMemoryBasic.h"
+ #include "mozilla/Atomics.h"
+@@ -34,7 +34,7 @@ struct ParamTraits;
+ namespace mozilla {
+ #if defined(OS_WIN)
+ typedef HANDLE CrossProcessMutexHandle;
+-#elif defined(OS_LINUX) || defined(OS_MACOSX)
++#elif !defined(OS_NETBSD) && !defined(OS_OPENBSD)
+ typedef mozilla::ipc::SharedMemoryBasic::Handle CrossProcessMutexHandle;
+ #else
+ // Stub for other platforms. We can't use uintptr_t here since different
+@@ -100,7 +100,7 @@ private:
+
+ #if defined(OS_WIN)
+ HANDLE mMutex;
+-#elif defined(OS_LINUX) || defined(OS_MACOSX)
++#elif !defined(OS_NETBSD) && !defined(OS_OPENBSD)
+ RefPtr<mozilla::ipc::SharedMemoryBasic> mSharedBuffer;
+ pthread_mutex_t* mMutex;
+ mozilla::Atomic<int32_t>* mCount;
+diff --git a/ipc/glue/moz.build b/ipc/glue/moz.build
+--- ipc/glue/moz.build
++++ ipc/glue/moz.build
+@@ -61,7 +61,7 @@ if CONFIG['OS_ARCH'] == 'WINNT':
+ SOURCES += [
+ 'CrossProcessMutex_windows.cpp',
+ ]
+-elif CONFIG['OS_ARCH'] in ('Linux', 'Darwin'):
++elif not CONFIG['OS_ARCH'] in ('NetBSD', 'OpenBSD'):
+ UNIFIED_SOURCES += [
+ 'CrossProcessMutex_posix.cpp',
+ ]