From 3119e412a75d7599e258a7e2b37009400cd1b51c Mon Sep 17 00:00:00 2001 From: Harald Wolff-Thobaben Date: Thu, 8 Jun 2023 10:57:03 +0200 Subject: [PATCH] PATCH: fix deprecation warnings regarding curl --- block/curl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/curl.c b/block/curl.c index 6a6cd72975..050cca580e 100644 --- a/block/curl.c +++ b/block/curl.c @@ -499,8 +499,8 @@ static int curl_init_state(BDRVCURLState *s, CURLState *state) * Restricting protocols is only supported from 7.19.4 upwards. */ #if LIBCURL_VERSION_NUM >= 0x071304 - curl_easy_setopt(state->curl, CURLOPT_PROTOCOLS, PROTOCOLS); - curl_easy_setopt(state->curl, CURLOPT_REDIR_PROTOCOLS, PROTOCOLS); + curl_easy_setopt(state->curl, CURLOPT_PROTOCOLS_STR, PROTOCOLS); + curl_easy_setopt(state->curl, CURLOPT_REDIR_PROTOCOLS_STR, PROTOCOLS); #endif #ifdef DEBUG_VERBOSE @@ -769,7 +769,7 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags, curl_easy_setopt(state->curl, CURLOPT_HEADERDATA, s); if (curl_easy_perform(state->curl)) goto out; - if (curl_easy_getinfo(state->curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &d)) { + if (curl_easy_getinfo(state->curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &d)) { goto out; } /* Prior CURL 7.19.4 return value of 0 could mean that the file size is not