803fb7
From 575f559bcd992d7fd2d7d46b695b7f42923b4463 Mon Sep 17 00:00:00 2001
803fb7
From: Lukas Nykryn <lnykryn@redhat.com>
803fb7
Date: Wed, 6 Apr 2016 15:39:09 +0200
803fb7
Subject: [PATCH] import: use the old curl api
803fb7
803fb7
libcurl in rhel does not have CURLOPT_XFERINFO* symbols, so lets use the
803fb7
old interface.
803fb7
803fb7
RHEL-only
803fb7
Resolves: #1284974
803fb7
---
803fb7
 src/import/import-job.c | 6 +++---
803fb7
 1 file changed, 3 insertions(+), 3 deletions(-)
803fb7
803fb7
diff --git a/src/import/import-job.c b/src/import/import-job.c
803fb7
index 809486500..5f9cfd366 100644
803fb7
--- a/src/import/import-job.c
803fb7
+++ b/src/import/import-job.c
803fb7
@@ -587,7 +587,7 @@ fail:
803fb7
         return 0;
803fb7
 }
803fb7
 
803fb7
-static int import_job_progress_callback(void *userdata, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow) {
803fb7
+static int import_job_progress_callback(void *userdata, double dltotal, double dlnow, double ultotal, double ulnow) {
803fb7
         ImportJob *j = userdata;
803fb7
         unsigned percent;
803fb7
         usec_t n;
803fb7
@@ -714,10 +714,10 @@ int import_job_begin(ImportJob *j) {
803fb7
         if (curl_easy_setopt(j->curl, CURLOPT_HEADERDATA, j) != CURLE_OK)
803fb7
                 return -EIO;
803fb7
 
803fb7
-        if (curl_easy_setopt(j->curl, CURLOPT_XFERINFOFUNCTION, import_job_progress_callback) != CURLE_OK)
803fb7
+        if (curl_easy_setopt(j->curl, CURLOPT_PROGRESSFUNCTION, import_job_progress_callback) != CURLE_OK)
803fb7
                 return -EIO;
803fb7
 
803fb7
-        if (curl_easy_setopt(j->curl, CURLOPT_XFERINFODATA, j) != CURLE_OK)
803fb7
+        if (curl_easy_setopt(j->curl, CURLOPT_PROGRESSDATA, j) != CURLE_OK)
803fb7
                 return -EIO;
803fb7
 
803fb7
         if (curl_easy_setopt(j->curl, CURLOPT_NOPROGRESS, 0) != CURLE_OK)