hrev52139 adds 1 changeset to branch 'master'
old head: 08021a3beb04e4d6ce44d4c47b8d4ce2e61e2351
new head: 55557aa1626a8030f7d88a0ab9746e4a9c09d454
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=55557aa1626a+%5E08021a3beb04
----------------------------------------------------------------------------
55557aa1626a: 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
Change-Id: I169ad84d15e61012d1d38a9b41af7eef81683bf7
[ JackBurton79 <stefano.ceccherini@xxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev52139
Commit: 55557aa1626a8030f7d88a0ab9746e4a9c09d454
URL: https://git.haiku-os.org/haiku/commit/?id=55557aa1626a
Author: JackBurton79 <stefano.ceccherini@xxxxxxxxx>
Date: Fri Jul 27 09:20:45 2018 UTC
Committer: Adrien Destugues <pulkomandy@xxxxxxxxx>
Commit-Date: Fri Jul 27 17:21:14 2018 UTC
----------------------------------------------------------------------------
1 file changed, 8 insertions(+), 5 deletions(-)
src/kits/package/FetchFileJob.cpp | 13 ++++++++-----
----------------------------------------------------------------------------
diff --git a/src/kits/package/FetchFileJob.cpp
b/src/kits/package/FetchFileJob.cpp
index fa55dcdbba..e4730e92aa 100644
--- a/src/kits/package/FetchFileJob.cpp
+++ b/src/kits/package/FetchFileJob.cpp
@@ -90,12 +90,15 @@ FetchFileJob::Execute()
if (handle == NULL)
return B_NO_MEMORY;
- result = curl_easy_setopt(handle, CURLOPT_NOPROGRESS, 0);
+ #if LIBCURL_VERSION_MAJOR > 7 \
+ || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 32)
+ result = curl_easy_setopt(handle, CURLOPT_NOPROGRESS, 0);
- result = curl_easy_setopt(handle, CURLOPT_XFERINFOFUNCTION,
- &_TransferCallback);
- if (result != CURLE_OK)
- return B_BAD_VALUE;
+ result = curl_easy_setopt(handle, CURLOPT_XFERINFOFUNCTION,
+ &_TransferCallback);
+ if (result != CURLE_OK)
+ return B_BAD_VALUE;
+ #endif
result = curl_easy_setopt(handle, CURLOPT_PROGRESSDATA, this);
if (result != CURLE_OK)