CURLINFO_SIZE_DOWNLOAD_T is a enum entry, use the version check instead
(cherry picked from commit c189053ee5
)
This commit is contained in:
parent
90fb075e34
commit
3b5c38d861
|
@ -264,7 +264,7 @@ bool KICAD_CURL_EASY::SetTransferCallback( const TRANSFER_CALLBACK& aCallback, s
|
||||||
{
|
{
|
||||||
progress = std::make_unique<CURL_PROGRESS>( this, aCallback,
|
progress = std::make_unique<CURL_PROGRESS>( this, aCallback,
|
||||||
static_cast<curl_off_t>( aInterval ) );
|
static_cast<curl_off_t>( aInterval ) );
|
||||||
#if LIBCURL_VERSION_NUM >= 0x072000
|
#if LIBCURL_VERSION_NUM >= 0x072000 // 7.32.0
|
||||||
setOption( CURLOPT_XFERINFOFUNCTION, xferinfo );
|
setOption( CURLOPT_XFERINFOFUNCTION, xferinfo );
|
||||||
setOption( CURLOPT_XFERINFODATA, progress.get() );
|
setOption( CURLOPT_XFERINFODATA, progress.get() );
|
||||||
#else
|
#else
|
||||||
|
@ -286,7 +286,7 @@ bool KICAD_CURL_EASY::SetOutputStream( const std::ostream* aOutput )
|
||||||
|
|
||||||
int KICAD_CURL_EASY::GetTransferTotal( uint64_t& aDownloadedBytes ) const
|
int KICAD_CURL_EASY::GetTransferTotal( uint64_t& aDownloadedBytes ) const
|
||||||
{
|
{
|
||||||
#ifdef CURLINFO_SIZE_DOWNLOAD_T
|
#if LIBCURL_VERSION_NUM >= 0x073700 // 7.55.0
|
||||||
curl_off_t dl;
|
curl_off_t dl;
|
||||||
int result = curl_easy_getinfo( m_CURL, CURLINFO_SIZE_DOWNLOAD_T, &dl );
|
int result = curl_easy_getinfo( m_CURL, CURLINFO_SIZE_DOWNLOAD_T, &dl );
|
||||||
aDownloadedBytes = static_cast<uint64_t>( dl );
|
aDownloadedBytes = static_cast<uint64_t>( dl );
|
||||||
|
|
Loading…
Reference in New Issue