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 c7308592fb
Closes #11417
This commit is contained in:
Stefan Eissing 2023-07-10 09:39:19 +02:00 committed by Daniel Stenberg
parent c7308592fb
commit c73b2f8207
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
3 changed files with 3 additions and 3 deletions

View File

@ -258,7 +258,7 @@
#if defined(__APPLE__) && !defined(USE_ARES)
#include <TargetConditionals.h>
#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

View File

@ -26,7 +26,7 @@
#if defined(__APPLE__)
#if defined(TARGET_OS_OSX) && TARGET_OS_OSX
#if !defined(TARGET_OS_OSX) || TARGET_OS_OSX
#include <curl/curl.h>

View File

@ -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);