--- lib/wx/c_src/wxe_impl.cpp
+++ lib/wx/c_src/wxe_impl.cpp	2025-04-16 03:53:21.000000000 +0800
@@ -198,7 +198,7 @@
   initEventTable();
   wxInitAllImageHandlers();
 
-#ifdef  _MACOSX
+#ifdef __WXOSX_MAC__
   /* Create a default MenuBar so that we can intercept the quit command */
   wxMenuBar *macMB = new wxMenuBar;
   wxMenuBar::MacSetCommonMenuBar(macMB);
@@ -221,7 +221,7 @@
 }
 
 
-#ifdef  _MACOSX
+#ifdef __WXOSX_MAC__
 void WxeApp::MacPrintFile(const wxString &filename) {
   send_msg("print_file", &filename);
 }

--- lib/wx/c_src/wxe_impl.h
+++ lib/wx/c_src/wxe_impl.h	2025-04-16 03:55:11.000000000 +0800
@@ -58,7 +58,7 @@
    virtual void OnAssertFailure(const wxChar *file, int line, const wxChar *func,
 				const wxChar *cond, const wxChar *msg);
 
-#ifdef  _MACOSX
+#ifdef __WXOSX_MAC__
   virtual void MacPrintFile(const wxString &filename);
   virtual void MacOpenFile(const wxString &filename);
   virtual void MacOpenURL(const wxString &url);
