summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadek Zajic <radek.zajic@showmax.com>2021-05-25 22:19:05 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-05-26 00:24:09 +0200
commit1a5e41d97c8f9c8ca3c5f3ec11f4f3865533098a (patch)
treed6a4e62034b968023cade667766046aa849bfdd1
parent54e5c245652bc659fdac40dfab4538d1f621a9a0 (diff)
downloadcurl-1a5e41d97c8f9c8ca3c5f3ec11f4f3865533098a.tar.gz
hostip: fix broken macOS/CMake/GCC builds
Follow-up to 31f631a142d855f06 Fixes #7128 Closes #7129
-rw-r--r--lib/hostip.c2
-rw-r--r--lib/timeval.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index 055c190d1..e0e3cfc2c 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -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) && \
diff --git a/lib/timeval.c b/lib/timeval.c
index 8523dad40..698651976 100644
--- a/lib/timeval.c
+++ b/lib/timeval.c
@@ -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))) {