diff options
author | Elliott Hughes <enh@google.com> | 2018-12-12 14:22:48 -0800 |
---|---|---|
committer | Tao Bao <tbao@google.com> | 2018-12-12 17:16:20 -0800 |
commit | a93fb051349a5907b547a8f41c23a4b45bc82c0e (patch) | |
tree | 15ffc0718b7d289dc407c0d3851234b7f71286b0 /docs/examples/anyauthput.c | |
parent | 849332cb73701636b19b97f3d82e8e9fa0d51a30 (diff) | |
download | external_curl-a93fb051349a5907b547a8f41c23a4b45bc82c0e.tar.gz external_curl-a93fb051349a5907b547a8f41c23a4b45bc82c0e.tar.bz2 external_curl-a93fb051349a5907b547a8f41c23a4b45bc82c0e.zip |
Update to curl 7.62.0 - October 31 2018.
Bug: N/A
Test: builds, boots, `vendor/google/tools/fake-ota on streaming` works
Change-Id: If5e3aa0ced1b9d13cc4f2217f381ab9df8d16dcc
Diffstat (limited to 'docs/examples/anyauthput.c')
-rw-r--r-- | docs/examples/anyauthput.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c index eb91d991..14da10c3 100644 --- a/docs/examples/anyauthput.c +++ b/docs/examples/anyauthput.c @@ -26,15 +26,18 @@ */ #include <stdio.h> #include <fcntl.h> +#include <sys/types.h> +#include <sys/stat.h> + +#include <curl/curl.h> + #ifdef WIN32 # include <io.h> +# define READ_3RD_ARG unsigned int #else # include <unistd.h> +# define READ_3RD_ARG size_t #endif -#include <sys/types.h> -#include <sys/stat.h> - -#include <curl/curl.h> #if LIBCURL_VERSION_NUM < 0x070c03 #error "upgrade your libcurl to no less than 7.12.3" @@ -83,7 +86,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream) int *fdp = (int *)stream; int fd = *fdp; - retcode = read(fd, ptr, size * nmemb); + retcode = read(fd, ptr, (READ_3RD_ARG)(size * nmemb)); nread = (curl_off_t)retcode; |