]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
macos: fix Apple SDK bug workaround for non-macOS targets
authorViktor Szakats <commit@vsz.me>
Thu, 25 Jul 2024 22:10:21 +0000 (00:10 +0200)
committerViktor Szakats <commit@vsz.me>
Mon, 29 Jul 2024 18:41:39 +0000 (20:41 +0200)
Turns out that MAC != OSX, despite what these names otherwise mean and
what's suggested by source code comments. "MAC" in fact means Darwin
(aka Apple), not macOS. "OSX" means macOS.

GitHub bumped the macos-14 runner default to Xcode 15.4, hitting the
llvm@15 incompatibility bug by default. Meaning the previous workaround
for the SDK bug is necessary.

This patch extend the workaround to not apply to mobile OS variants.

Follow-up to ff784af461175584c73e7e2b65af00b1a5a6f67f #14159
Reported-by: Sergey
Confirmed-by: Marcel Raad
Fixes #14269
Closes #14275

lib/curl_setup.h

index 1e5371ef8fba5603c118c3712924e65b731a50bc..c8dba5e2b42dd6ac7d173c8552e7897067edf162 100644 (file)
@@ -71,7 +71,9 @@
    the necessary dynamic detection features, so the SDK falls back to
    a codepath that sets both the old and new macro to 1. */
 #if defined(TARGET_OS_MAC) && TARGET_OS_MAC && \
-  defined(TARGET_OS_OSX) && !TARGET_OS_OSX
+  defined(TARGET_OS_OSX) && !TARGET_OS_OSX && \
+  (!defined(TARGET_OS_IPHONE) || !TARGET_OS_IPHONE) && \
+  (!defined(TARGET_OS_SIMULATOR) || !TARGET_OS_SIMULATOR)
 #undef TARGET_OS_OSX
 #define TARGET_OS_OSX TARGET_OS_MAC
 #endif