From d8dc08e4f66a77904be7ebe91fc0723bebf0c5e1 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 27 Jan 2023 18:32:56 +0100 Subject: [PATCH] (macOS) Fixed a curl compatibility issue on older OS releases. --- es-core/src/HttpReq.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/es-core/src/HttpReq.cpp b/es-core/src/HttpReq.cpp index ea0bc89e5..32c27ece3 100644 --- a/es-core/src/HttpReq.cpp +++ b/es-core/src/HttpReq.cpp @@ -137,7 +137,8 @@ HttpReq::HttpReq(const std::string& url) // Set curl restrict redirect protocols. -#if LIBCURL_VERSION_MAJOR < 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR < 85) +#if defined(__APPLE__) || LIBCURL_VERSION_MAJOR < 7 || \ + (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR < 85) err = curl_easy_setopt(mHandle, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); #else err = curl_easy_setopt(mHandle, CURLOPT_REDIR_PROTOCOLS_STR, "http,https");