include/systools/curlinit.hxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit bb8ed67114b2312acd6a101b39fa029a6589d1b9
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Mon Nov 13 09:39:42 2023 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Nov 13 15:28:51 2023 +0100

    fix build with older curl
    
    Change-Id: I167a92c116fba8c92347d09e3078b70f4f4aef4d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159360
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    Tested-by: Jenkins

diff --git a/include/systools/curlinit.hxx b/include/systools/curlinit.hxx
index 7034534af66f..bf2899ee1e23 100644
--- a/include/systools/curlinit.hxx
+++ b/include/systools/curlinit.hxx
@@ -44,10 +44,17 @@ static void InitCurl_easy(CURL* const pCURL)
         assert(rc == CURLE_OK);
         rc = curl_easy_setopt(pCURL, CURLOPT_PROXY_SSLVERSION, 
CURL_SSLVERSION_TLSv1_2);
         assert(rc == CURLE_OK);
+#if (LIBCURL_VERSION_MAJOR > 7) || (LIBCURL_VERSION_MAJOR == 7 && 
LIBCURL_VERSION_MINOR >= 85)
         rc = curl_easy_setopt(pCURL, CURLOPT_PROTOCOLS_STR, "https");
         assert(rc == CURLE_OK);
         rc = curl_easy_setopt(pCURL, CURLOPT_REDIR_PROTOCOLS_STR, "https");
         assert(rc == CURLE_OK);
+#else
+        rc = curl_easy_setopt(pCURL, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
+        assert(rc == CURLE_OK);
+        rc = curl_easy_setopt(pCURL, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTPS);
+        assert(rc == CURLE_OK);
+#endif
     }
 
     curl_version_info_data const* const 
pVersion(curl_version_info(CURLVERSION_NOW));

Reply via email to