(macOS) Fixed a curl compatibility issue on older OS releases.

This commit is contained in:
Leon Styhre 2023-01-27 18:32:56 +01:00
parent e9b1718fca
commit d8dc08e4f6

View file

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