Skip to content
Snippets Groups Projects
Commit 36a2fac7 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

typecast the size to long for platforms where st_size is off_t

parent 58cf1082
No related branches found
No related tags found
No related merge requests found
......@@ -85,8 +85,9 @@ int main(int argc, char **argv)
/* now specify which file to upload */
curl_easy_setopt(curl, CURLOPT_READDATA, hd_src);
/* and give the size of the upload (optional) */
curl_easy_setopt(curl, CURLOPT_INFILESIZE, file_info.st_size);
/* and give the size of the upload, make sure that we don't accidentally
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! */
res = curl_easy_perform(curl);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment