summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-27 15:45:39 +0200
committerDan McGee <dan@archlinux.org>2011-08-29 02:36:50 +0200
commit84d6de806bd18f4a6c0940de5ee60904f650539c (patch)
tree566e815a86bb53c6a3cc529e318d345649fd3449
parent5a07b75b225cbc731fbfb915a9c9edf0c300ccc4 (diff)
downloadpacman-84d6de806bd18f4a6c0940de5ee60904f650539c.tar.gz
pacman-84d6de806bd18f4a6c0940de5ee60904f650539c.tar.xz
Fix possible mismatched type with several curl arguments
After commit 2e7d0023150664, 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>
-rw-r--r--lib/libalpm/dload.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 6ae69171..8cdb075c 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -205,7 +205,8 @@ static void curl_set_handle_opts(struct dload_payload *payload,
curl_easy_setopt(handle->curl, CURLOPT_WRITEHEADER, (void *)payload);
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) {
@@ -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) {
/* a previous partial download exists, resume from end of file. */
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");
payload->initial_size = st.st_size;
}