This repository was archived by the owner on Sep 13, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments