cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: using libcurl produces unaligned file size

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 13 Jun 2005 16:27:50 +0200 (CEST)

On Mon, 13 Jun 2005, Walter Reiner wrote:

> /* size of file to upload */
> curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
> (curl_off_t)file_info.st_size);

> == Info: Uploaded unaligned file size (46 out of 577774999411097646 bytes)

It looks like there's a mismatch between your code and libcurl about what a
curl_off_t is. It loook like you pass it in as a 32 bit value while the lib
expects (and reads) a 64bit.

On Linux, curl_off_t is simply typedefed to an off_t, and you should make sure
that you build your app to use large file support. Or use the option without
*_LARGE.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-06-13