From 8d0ff3d7dc4ea925a1fd94ae022a16a14945aa3f Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 6 Sep 2011 11:44:29 -0500 Subject: dload: use intmax_t when printing off_t This works for both 32-bit and 64-bit platforms. Signed-off-by: Dan McGee --- lib/libalpm/dload.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/dload.c') diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index ec3f4989..4937f6ea 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -213,7 +213,8 @@ static void curl_set_handle_opts(struct dload_payload *payload, _alpm_log(handle, ALPM_LOG_DEBUG, "url: %s\n", payload->fileurl); if(payload->max_size) { - _alpm_log(handle, ALPM_LOG_DEBUG, "maxsize: %ld\n", payload->max_size); + _alpm_log(handle, ALPM_LOG_DEBUG, "maxsize: %jd\n", + (intmax_t)payload->max_size); curl_easy_setopt(handle->curl, CURLOPT_MAXFILESIZE_LARGE, (curl_off_t)payload->max_size); } @@ -235,7 +236,8 @@ static void curl_set_handle_opts(struct dload_payload *payload, 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 from %jd bytes\n", st.st_size); + "tempfile found, attempting continuation from %jd bytes\n", + (intmax_t)st.st_size); payload->initial_size = st.st_size; } } -- cgit v1.2.3-24-g4f1b