fix-apple-sdk-bug.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From 5f6b9244ceecbb1e1b9c08bda5c9292f23f4ea57 Mon Sep 17 00:00:00 2001
  2. From: Viktor Szakats <[email protected]>
  3. Date: Fri, 26 Jul 2024 00:10:21 +0200
  4. Subject: [PATCH] macos: fix Apple SDK bug workaround for non-macOS targets
  5. Turns out that MAC != OSX, despite what these names otherwise mean and
  6. what's suggested by source code comments. "MAC" in fact means Darwin
  7. (aka Apple), not macOS. "OSX" means macOS.
  8. GitHub bumped the macos-14 runner default to Xcode 15.4, hitting the
  9. llvm@15 incompatibility bug by default. Meaning the previous workaround
  10. for the SDK bug is necessary.
  11. This patch extend the workaround to not apply to mobile OS variants.
  12. Follow-up to ff784af461175584c73e7e2b65af00b1a5a6f67f #14159
  13. Reported-by: Sergey
  14. Confirmed-by: Marcel Raad
  15. Fixes #14269
  16. Closes #14275
  17. ---
  18. lib/curl_setup.h | 4 +++-
  19. 1 file changed, 3 insertions(+), 1 deletion(-)
  20. diff --git a/lib/curl_setup.h b/lib/curl_setup.h
  21. index 1e5371ef8..c8dba5e2b 100644
  22. --- a/lib/curl_setup.h
  23. +++ b/lib/curl_setup.h
  24. @@ -71,7 +71,9 @@
  25. the necessary dynamic detection features, so the SDK falls back to
  26. a codepath that sets both the old and new macro to 1. */
  27. #if defined(TARGET_OS_MAC) && TARGET_OS_MAC && \
  28. - defined(TARGET_OS_OSX) && !TARGET_OS_OSX
  29. + defined(TARGET_OS_OSX) && !TARGET_OS_OSX && \
  30. + (!defined(TARGET_OS_IPHONE) || !TARGET_OS_IPHONE) && \
  31. + (!defined(TARGET_OS_SIMULATOR) || !TARGET_OS_SIMULATOR)
  32. #undef TARGET_OS_OSX
  33. #define TARGET_OS_OSX TARGET_OS_MAC
  34. #endif
  35. --
  36. 2.47.1