mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 19:36:48 +02:00
24 lines
722 B
Diff
24 lines
722 B
Diff
--- a/src/rdrview.c
|
|
+++ b/src/rdrview.c
|
|
@@ -230,7 +230,6 @@ static void url_to_file(FILE *file)
|
|
CURLcode res;
|
|
char errbuf[CURL_ERROR_SIZE];
|
|
size_t errlen;
|
|
- long protocols;
|
|
|
|
curl = curl_easy_init();
|
|
if (!curl)
|
|
@@ -243,8 +242,12 @@ static void url_to_file(FILE *file)
|
|
fatal();
|
|
|
|
/* I don't expect any other protocols, so be safe */
|
|
- protocols = CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FILE;
|
|
+ #if CURL_AT_LEAST_VERSION(7, 85, 0)
|
|
+ if (curl_easy_setopt(curl, CURLOPT_PROTOCOLS_STR, "HTTP,HTTPS,FILE"))
|
|
+ #else
|
|
+ long protocols = CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FILE;
|
|
if (curl_easy_setopt(curl, CURLOPT_PROTOCOLS, protocols))
|
|
+ #endif
|
|
fatal();
|
|
|
|
/* Enable automatic decompression */
|