diff --git a/src/html/htmlctrl/webkit/webkit.mm b/src/html/htmlctrl/webkit/webkit.mm
index 5c968fce65..d6a4e6fe7d 100644
--- a/src/html/htmlctrl/webkit/webkit.mm
+++ b/src/html/htmlctrl/webkit/webkit.mm
@@ -702,7 +702,7 @@ wxString wxWebKitCtrl::RunScript(const wxString& javascript){
}
void wxWebKitCtrl::OnSize(wxSizeEvent &event){
-#if defined(__WXMAC_) && wxOSX_USE_CARBON
+#if defined(__WXMAC__) && wxOSX_USE_CARBON
// This is a nasty hack because WebKit seems to lose its position when it is embedded
// in a control that is not itself the content view for a TLW.
// I put it in OnSize because these calcs are not perfect, and in fact are basically
diff --git a/src/osx/webview_webkit.mm b/src/osx/webview_webkit.mm
index 78d92d6637..598f63391e 100644
--- a/src/osx/webview_webkit.mm
+++ b/src/osx/webview_webkit.mm
@@ -648,7 +648,7 @@ void wxWebViewWebKit::RunScript(const wxString& javascript)
void wxWebViewWebKit::OnSize(wxSizeEvent &event)
{
-#if defined(__WXMAC_) && wxOSX_USE_CARBON
+#if defined(__WXMAC__) && wxOSX_USE_CARBON
// This is a nasty hack because WebKit seems to lose its position when it is
// embedded in a control that is not itself the content view for a TLW.
// I put it in OnSize because these calcs are not perfect, and in fact are