79fd5d2214
Changes: https://www.mozilla.org/thunderbird/45.0/releasenotes/ Security: 92d44f83-a7bf-41cf-91ee-3d1b8ecf579f MFH: 2016Q2
44 lines
1.5 KiB
Text
44 lines
1.5 KiB
Text
# Prefer PTHREAD_PROCESS_SHARED on FreeBSD 11.0 or later
|
|
|
|
diff --git a/ipc/glue/CrossProcessMutex.h b/ipc/glue/CrossProcessMutex.h
|
|
--- mozilla/ipc/glue/CrossProcessMutex.h
|
|
+++ mozilla/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
|
|
--- mozilla/ipc/glue/moz.build
|
|
+++ mozilla/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',
|
|
]
|