summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-03-26 17:26:53 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-03-26 17:26:53 +0100
commit7fd60f789790ebf9efa9cfee3b86cf5c2fdb9a11 (patch)
treed94688d14cd5795ab47b668261a93075c0f7b3dc /src
parentff11ba5c4f866089b6457daa42b54b04615b156b (diff)
parent181039826ab5965f40ed7462a51e3ff5a7a76be1 (diff)
Merge branch 'c99pedant-curl-legacy-callback-patch-1'
Diffstat (limited to 'src')
-rw-r--r--src/imlib.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/imlib.c b/src/imlib.c
index 13fd1df..b9f071a 100644
--- a/src/imlib.c
+++ b/src/imlib.c
@@ -542,7 +542,11 @@ static char *feh_magick_load_image(char *filename)
#ifdef HAVE_LIBCURL
+#if LIBCURL_VERSION_NUM >= 0x072000 /* 07.32.0 */
static int curl_quit_function(void *clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow)
+#else
+static int curl_quit_function(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)
+#endif
{
// ignore "unused parameter" warnings
(void)clientp;
@@ -617,6 +621,8 @@ static char *feh_http_load_image(char *url)
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
#if LIBCURL_VERSION_NUM >= 0x072000 /* 07.32.0 */
curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, curl_quit_function);
+#else
+ curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, curl_quit_function);
#endif
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
if (opt.insecure_ssl) {