Bug 1955801 - Fix non-unified build error in SharedMemoryPlatform_mach.cpp on macOS. r=afranchuk

Bug 1942129 added a use of PR_BEGIN_MACRO to SharedMemoryPlatform_mach.cpp, but only included the macro's definition (in prtypes.h) when building for iOS, not macOS.

/Users/chris/Code/mozilla/firefox-hg/ipc/glue/SharedMemoryPlatform_mach.cpp:67:5: error: unknown type name 'PR_BEGIN_MACRO'
   67 |     LOG_ERROR("Failed to make memory entry (%zu bytes). %s (%x)\n", aSize,
      |     ^
/Users/chris/Code/mozilla/firefox-hg/ipc/glue/SharedMemoryPlatform_mach.cpp:38:5: note: expanded from macro 'LOG_ERROR'
   38 |     PR_BEGIN_MACRO                                                 \
      |     ^

Differential Revision: https://phabricator.services.mozilla.com/D242646
This commit is contained in:
Chris Peterson
2025-03-24 18:05:11 +00:00
parent 920660bd58
commit 953bc3fdcd

View File

@@ -11,7 +11,6 @@
#include <mach/vm_map.h>
#include <mach/mach_port.h>
#if defined(XP_IOS)
# include <prtypes.h>
# include <mach/vm_map.h>
# define mach_vm_address_t vm_address_t
# define mach_vm_map vm_map
@@ -28,6 +27,7 @@
#if defined(XP_MACOSX) && defined(__x86_64__)
# include "prenv.h"
#endif
#include <prtypes.h>
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/Printf.h"