# 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 #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 mSharedBuffer; pthread_mutex_t* mMutex; mozilla::Atomic* 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', ]