diff --git a/ipc/glue/CrossProcessMutex.h b/ipc/glue/CrossProcessMutex.h index 77e8f117a1e8..9167df4bdaac 100644 --- a/ipc/glue/CrossProcessMutex.h +++ b/ipc/glue/CrossProcessMutex.h @@ -9,7 +9,7 @@ #include "base/process.h" #include "mozilla/Mutex.h" -#if defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_LINUX) || defined(XP_DARWIN) #include #include "SharedMemoryBasic.h" #include "mozilla/Atomics.h" diff --git a/ipc/glue/SharedMemoryBasic.h b/ipc/glue/SharedMemoryBasic.h index 223e735b34da..f3f729121c7a 100644 --- a/ipc/glue/SharedMemoryBasic.h +++ b/ipc/glue/SharedMemoryBasic.h @@ -10,7 +10,7 @@ #ifdef ANDROID # include "mozilla/ipc/SharedMemoryBasic_android.h" -#elif defined(XP_MACOSX) +#elif defined(XP_DARWIN) # include "mozilla/ipc/SharedMemoryBasic_mach.h" #else # include "mozilla/ipc/SharedMemoryBasic_chromium.h" diff --git a/ipc/glue/SharedMemoryBasic_mach.cpp b/ipc/glue/SharedMemoryBasic_mach.mm similarity index 98% rename from ipc/glue/SharedMemoryBasic_mach.cpp rename to ipc/glue/SharedMemoryBasic_mach.mm index a2dc8c59e812..c4667ad97be3 100644 --- a/ipc/glue/SharedMemoryBasic_mach.cpp +++ b/ipc/glue/SharedMemoryBasic_mach.mm @@ -9,7 +9,18 @@ #include #include +#if defined(XP_IOS) +#include +#define mach_vm_address_t vm_address_t +#define mach_vm_allocate vm_allocate +#define mach_vm_deallocate vm_deallocate +#define mach_vm_map vm_map +#define mach_vm_read vm_read +#define mach_vm_region_recurse vm_region_recurse_64 +#define mach_vm_size_t vm_size_t +#else #include +#endif #include #include #include "SharedMemoryBasic.h" diff --git a/ipc/glue/moz.build b/ipc/glue/moz.build index 1786fb7c15c3..e0d4c476461b 100644 --- a/ipc/glue/moz.build +++ b/ipc/glue/moz.build @@ -80,7 +80,7 @@ if CONFIG['OS_TARGET'] == 'Android': elif CONFIG['OS_ARCH'] == 'Darwin': EXPORTS.mozilla.ipc += ['SharedMemoryBasic_mach.h'] SOURCES += [ - 'SharedMemoryBasic_mach.cpp', + 'SharedMemoryBasic_mach.mm', ] else: EXPORTS.mozilla.ipc += ['SharedMemoryBasic_chromium.h']