1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

libstore: fix curl callback function signature

This commit is contained in:
Philipp Otterbein 2025-02-25 19:42:59 +01:00
parent d904921eec
commit b074345d35

View file

@ -261,7 +261,7 @@ struct curlFileTransfer : public FileTransfer
return ((TransferItem *) userp)->headerCallback(contents, size, nmemb); return ((TransferItem *) userp)->headerCallback(contents, size, nmemb);
} }
int progressCallback(double dltotal, double dlnow) int progressCallback(curl_off_t dltotal, curl_off_t dlnow)
{ {
try { try {
act.progress(dlnow, dltotal); act.progress(dlnow, dltotal);
@ -271,17 +271,17 @@ struct curlFileTransfer : public FileTransfer
return getInterrupted(); return getInterrupted();
} }
int silentProgressCallback(double dltotal, double dlnow) int silentProgressCallback(curl_off_t dltotal, curl_off_t dlnow)
{ {
return getInterrupted(); return getInterrupted();
} }
static int progressCallbackWrapper(void * userp, double dltotal, double dlnow, double ultotal, double ulnow) static int progressCallbackWrapper(void * userp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow)
{ {
return ((TransferItem *) userp)->progressCallback(dltotal, dlnow); return ((TransferItem *) userp)->progressCallback(dltotal, dlnow);
} }
static int silentProgressCallbackWrapper(void * userp, double dltotal, double dlnow, double ultotal, double ulnow) static int silentProgressCallbackWrapper(void * userp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow)
{ {
return ((TransferItem *) userp)->silentProgressCallback(dltotal, dlnow); return ((TransferItem *) userp)->silentProgressCallback(dltotal, dlnow);
} }