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

Commit b5b7c44

Browse files
author
Damian Kowalewski
committed
fix raspberry pi compilation
1 parent 62419fd commit b5b7c44

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

unix/src/parse.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,18 +623,29 @@ static void parseSendRequestInternal(
623623
if (callback != NULL) callback(client, result, 0, NULL);
624624
return;
625625
}
626-
626+
#if LIBCURL_VERSION_NUM >= 0x072000
627627
result = curl_easy_setopt(curl, CURLOPT_XFERINFODATA, (void*)((uintptr_t)secondsSinceBoot()));
628628
if (result != CURLE_OK) {
629629
if (callback != NULL) callback(client, result, 0, NULL);
630630
return;
631631
}
632-
633632
result = curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, parseProgressInternal);
634633
if (result != CURLE_OK) {
635634
if (callback != NULL) callback(client, result, 0, NULL);
636635
return;
637636
}
637+
#else
638+
result = curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, (void*)((uintptr_t)secondsSinceBoot()));
639+
if (result != CURLE_OK) {
640+
if (callback != NULL) callback(client, result, 0, NULL);
641+
return;
642+
}
643+
result = curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, parseProgressInternal);
644+
if (result != CURLE_OK) {
645+
if (callback != NULL) callback(client, result, 0, NULL);
646+
return;
647+
}
648+
#endif
638649

639650
result = curl_easy_perform(curl);
640651
if (result != CURLE_OK) {

0 commit comments

Comments
 (0)