]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
hostip: fix broken macOS/CMake/GCC builds
authorRadek Zajic <radek.zajic@showmax.com>
Tue, 25 May 2021 20:19:05 +0000 (22:19 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 25 May 2021 22:24:09 +0000 (00:24 +0200)
Follow-up to 31f631a142d855f06

Fixes #7128
Closes #7129

lib/hostip.c
lib/timeval.c

index 055c190d1cdc430c2fd8610e5b961a0bf2215865..e0e3cfc2cbdef9f6d61d11c80c0ec3ade1067c33 100644 (file)
@@ -69,7 +69,7 @@
 #include "memdebug.h"
 
 #if defined(ENABLE_IPV6) && defined(CURL_OSX_CALL_COPYPROXIES)
-#include <SystemConfiguration/SystemConfiguration.h>
+#include <SystemConfiguration/SCDynamicStoreCopySpecific.h>
 #endif
 
 #if defined(CURLRES_SYNCH) && \
index 8523dad4009970b7328a1dd2814047d1a98b05ca..698651976be90b379800eef8fdf351b2447170b3 100644 (file)
@@ -78,14 +78,16 @@ struct curltime Curl_now(void)
   ** code compiles but fails during run-time if clock_gettime() is
   ** called on unsupported OS version.
   */
-#if defined(__APPLE__) && (HAVE_BUILTIN_AVAILABLE == 1)
+#if defined(__APPLE__) && defined(HAVE_BUILTIN_AVAILABLE) && \
+        (HAVE_BUILTIN_AVAILABLE == 1)
   bool have_clock_gettime = FALSE;
   if(__builtin_available(macOS 10.12, iOS 10, tvOS 10, watchOS 3, *))
     have_clock_gettime = TRUE;
 #endif
 
   if(
-#if defined(__APPLE__) && (HAVE_BUILTIN_AVAILABLE == 1)
+#if defined(__APPLE__) && defined(HAVE_BUILTIN_AVAILABLE) && \
+        (HAVE_BUILTIN_AVAILABLE == 1)
     have_clock_gettime &&
 #endif
     (0 == clock_gettime(CLOCK_MONOTONIC, &tsnow))) {