mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
typecast the size to long for platforms where st_size is off_t
This commit is contained in:
parent
58cf108251
commit
36a2fac79f
@ -85,8 +85,9 @@ int main(int argc, char **argv)
|
|||||||
/* now specify which file to upload */
|
/* now specify which file to upload */
|
||||||
curl_easy_setopt(curl, CURLOPT_READDATA, hd_src);
|
curl_easy_setopt(curl, CURLOPT_READDATA, hd_src);
|
||||||
|
|
||||||
/* and give the size of the upload (optional) */
|
/* and give the size of the upload, make sure that we don't accidentally
|
||||||
curl_easy_setopt(curl, CURLOPT_INFILESIZE, file_info.st_size);
|
pass a larger variable type than "long". */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_INFILESIZE, (long) file_info.st_size);
|
||||||
|
|
||||||
/* Now run off and do what you've been told! */
|
/* Now run off and do what you've been told! */
|
||||||
res = curl_easy_perform(curl);
|
res = curl_easy_perform(curl);
|
||||||
|
Loading…
Reference in New Issue
Block a user