Skip to content
This repository was archived by the owner on Sep 13, 2020. It is now read-only.

Commit 1b5cfb3

Browse files
author
Damian Kowalewski
committed
Merge pull request #33 from mtl2034/master
fix raspberry pi compilation
2 parents 62419fd + 5d1f106 commit 1b5cfb3

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

unix/src/parse.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -624,13 +624,20 @@ static void parseSendRequestInternal(
624624
return;
625625
}
626626

627-
result = curl_easy_setopt(curl, CURLOPT_XFERINFODATA, (void*)((uintptr_t)secondsSinceBoot()));
627+
#if LIBCURL_VERSION_NUM >= 0x072000
628+
#define CURLOPT_TRANSFERDATA_MACTHING_LIB CURLOPT_XFERINFODATA
629+
#define CURLOPT_PROGRESSFUNCTION_MATCHING_LIB CURLOPT_XFERINFOFUNCTION
630+
#else
631+
#define CURLOPT_TRANSFERDATA_MACTHING_LIB CURLOPT_PROGRESSDATA
632+
#define CURLOPT_PROGRESSFUNCTION_MATCHING_LIB CURLOPT_PROGRESSFUNCTION
633+
#endif
634+
635+
result = curl_easy_setopt(curl, CURLOPT_TRANSFERDATA_MACTHING_LIB, (void*)((uintptr_t)secondsSinceBoot()));
628636
if (result != CURLE_OK) {
629637
if (callback != NULL) callback(client, result, 0, NULL);
630638
return;
631639
}
632-
633-
result = curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, parseProgressInternal);
640+
result = curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION_MATCHING_LIB, parseProgressInternal);
634641
if (result != CURLE_OK) {
635642
if (callback != NULL) callback(client, result, 0, NULL);
636643
return;

0 commit comments

Comments
 (0)