From c73b2f8207b3f8670a3294c80f1791c4eb9bb586 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Mon, 10 Jul 2023 09:39:19 +0200 Subject: [PATCH] macOS: fix taget detection - TARGET_OS_OSX is not always defined on macOS - this leads to missing symbol Curl_macos_init() - TargetConditionals.h seems to define these only when dynamic targets are enabled (somewhere?) - this PR fixes that on my macOS 13.4.1 - I have no clue why CI builds worked without it Follow-up to c7308592fb8ba213fc2c1 Closes #11417 --- lib/curl_setup.h | 2 +- lib/macos.c | 2 +- lib/macos.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/curl_setup.h b/lib/curl_setup.h index 38cf6ffc12..727d123e5a 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -258,7 +258,7 @@ #if defined(__APPLE__) && !defined(USE_ARES) #include #define USE_RESOLVE_ON_IPS 1 -# if defined(TARGET_OS_OSX) && TARGET_OS_OSX +# if !defined(TARGET_OS_OSX) || TARGET_OS_OSX # define CURL_OSX_CALL_COPYPROXIES 1 # endif #endif diff --git a/lib/macos.c b/lib/macos.c index abebb95a5a..5fe4e0bf77 100644 --- a/lib/macos.c +++ b/lib/macos.c @@ -26,7 +26,7 @@ #if defined(__APPLE__) -#if defined(TARGET_OS_OSX) && TARGET_OS_OSX +#if !defined(TARGET_OS_OSX) || TARGET_OS_OSX #include diff --git a/lib/macos.h b/lib/macos.h index 4e7e608249..3388acd9fe 100644 --- a/lib/macos.h +++ b/lib/macos.h @@ -25,7 +25,7 @@ ***************************************************************************/ #include "curl_setup.h" -#if defined(__APPLE__) && defined(TARGET_OS_OSX) && TARGET_OS_OSX +#if defined(__APPLE__) && (!defined(TARGET_OS_OSX) || TARGET_OS_OSX) CURLcode Curl_macos_init(void); -- 2.47.3