mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
Fix possible mismatched type with several curl arguments
After commit 2e7d002315
, we use off_t rather than long variables.
Use the _LARGE variants of the methods to indicate we are passing off_t
sized variables, and cast using (curl_off_t) accordingly.
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
5a07b75b22
commit
84d6de806b
@ -205,7 +205,8 @@ static void curl_set_handle_opts(struct dload_payload *payload,
|
|||||||
curl_easy_setopt(handle->curl, CURLOPT_WRITEHEADER, (void *)payload);
|
curl_easy_setopt(handle->curl, CURLOPT_WRITEHEADER, (void *)payload);
|
||||||
|
|
||||||
if(payload->max_size) {
|
if(payload->max_size) {
|
||||||
curl_easy_setopt(handle->curl, CURLOPT_MAXFILESIZE, payload->max_size);
|
curl_easy_setopt(handle->curl, CURLOPT_MAXFILESIZE_LARGE,
|
||||||
|
(curl_off_t)payload->max_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(useragent != NULL) {
|
if(useragent != NULL) {
|
||||||
@ -220,7 +221,8 @@ static void curl_set_handle_opts(struct dload_payload *payload,
|
|||||||
} else if(stat(payload->tempfile_name, &st) == 0 && payload->allow_resume) {
|
} else if(stat(payload->tempfile_name, &st) == 0 && payload->allow_resume) {
|
||||||
/* a previous partial download exists, resume from end of file. */
|
/* a previous partial download exists, resume from end of file. */
|
||||||
payload->tempfile_openmode = "ab";
|
payload->tempfile_openmode = "ab";
|
||||||
curl_easy_setopt(handle->curl, CURLOPT_RESUME_FROM, (long)st.st_size);
|
curl_easy_setopt(handle->curl, CURLOPT_RESUME_FROM_LARGE,
|
||||||
|
(curl_off_t)st.st_size);
|
||||||
_alpm_log(handle, ALPM_LOG_DEBUG, "tempfile found, attempting continuation\n");
|
_alpm_log(handle, ALPM_LOG_DEBUG, "tempfile found, attempting continuation\n");
|
||||||
payload->initial_size = st.st_size;
|
payload->initial_size = st.st_size;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user