From 68d95dcc41b51ef96982d624c79cd0b2d03f6cd0 Mon Sep 17 00:00:00 2001
From: JackBurton79 <stefano.ceccherini@gmail.com>
Date: Fri, 27 Jul 2018 11:20:45 +0200
Subject: [PATCH] CURLOPT_XFERINFOFUNCTION is available since libcurl 7.32.0
only. Since it's just cosmetic, allow compiling with older libcurl, too.
fixes build on RedHat/CentOS 7
---
src/kits/package/FetchFileJob.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/kits/package/FetchFileJob.cpp b/src/kits/package/FetchFileJob.cpp
index fa55dcd..28cc24e 100644
a
|
b
|
FetchFileJob::Execute()
|
90 | 90 | if (handle == NULL) |
91 | 91 | return B_NO_MEMORY; |
92 | 92 | |
93 | | result = curl_easy_setopt(handle, CURLOPT_NOPROGRESS, 0); |
| 93 | #if LIBCURL_VERSION_MAJOR >= 7 && LIBCURL_VERSION_MINOR >= 32 |
| 94 | result = curl_easy_setopt(handle, CURLOPT_NOPROGRESS, 0); |
94 | 95 | |
95 | 96 | result = curl_easy_setopt(handle, CURLOPT_XFERINFOFUNCTION, |
96 | 97 | &_TransferCallback); |
97 | 98 | if (result != CURLE_OK) |
98 | 99 | return B_BAD_VALUE; |
| 100 | #endif |
99 | 101 | |
100 | 102 | result = curl_easy_setopt(handle, CURLOPT_PROGRESSDATA, this); |
101 | 103 | if (result != CURLE_OK) |