]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
debuginfod-client: Use CURLOPT_PROTOCOLS_STR for libcurl >= 7.85.0
authorMark Wielaard <mark@klomp.org>
Tue, 10 Jan 2023 22:20:41 +0000 (23:20 +0100)
committerMark Wielaard <mark@klomp.org>
Wed, 11 Jan 2023 14:13:24 +0000 (15:13 +0100)
https://sourceware.org/bugzilla/show_bug.cgi?id=29926

Signed-off-by: Mark Wielaard <mark@klomp.org>
debuginfod/ChangeLog
debuginfod/debuginfod-client.c

index 2ddb7ca06f6e9555bf731a0d31387be186adb893..8f9637f503bab6252983ef8c4575711dfbea5341 100644 (file)
@@ -1,3 +1,8 @@
+2023-01-10  Mark Wielaard  <mark@klomp.org>
+
+       * debuginfod-client.c (debuginfod_query_server): Use
+       CURL_AT_LEAST_VERSION(7.85.0) for CURLOPT_PROTOCOLS_STR.
+
 2022-12-21  Mark Wielaard  <mark@klomp.org>
 
        * debuginfod-client.c: Define CURL_AT_LEAST_VERSION.
index a16165bd184d745e2379624476037e4edd2f168d..1ce4563277db769f9c202ac3b628757799653491 100644 (file)
@@ -1336,8 +1336,13 @@ debuginfod_query_server (debuginfod_client *c,
 
       /* Only allow http:// + https:// + file:// so we aren't being
         redirected to some unsupported protocol.  */
+#if CURL_AT_LEAST_VERSION(7, 85, 0)
+      curl_easy_setopt_ck(data[i].handle, CURLOPT_PROTOCOLS_STR,
+                         "http,https,file");
+#else
       curl_easy_setopt_ck(data[i].handle, CURLOPT_PROTOCOLS,
                          (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FILE));
+#endif
       curl_easy_setopt_ck(data[i].handle, CURLOPT_URL, data[i].url);
       if (vfd >= 0)
        curl_easy_setopt_ck(data[i].handle, CURLOPT_ERRORBUFFER,