aboutsummaryrefslogtreecommitdiff
path: root/ftp/curl/files/patch-docs::examples::fileupload.c
diff options
context:
space:
mode:
Diffstat (limited to 'ftp/curl/files/patch-docs::examples::fileupload.c')
-rw-r--r--ftp/curl/files/patch-docs::examples::fileupload.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/ftp/curl/files/patch-docs::examples::fileupload.c b/ftp/curl/files/patch-docs::examples::fileupload.c
new file mode 100644
index 000000000000..332465b44417
--- /dev/null
+++ b/ftp/curl/files/patch-docs::examples::fileupload.c
@@ -0,0 +1,16 @@
+diff -urN -urN -x .svn ../../vendor/curl/docs/examples/fileupload.c ./docs/examples/fileupload.c
+--- ../../vendor/curl/docs/examples/fileupload.c 2008-03-19 12:29:25.000000000 +0200
++++ ./docs/examples/fileupload.c 2008-04-02 13:42:22.000000000 +0300
+@@ -27,7 +27,11 @@
+ return 1; /* can't continue */
+ }
+
+- stat("debugit", &file_info); /* to get the file size */
++ /* to get the file size */
++ if(fstat(fileno(fd), &file_info) != 0) {
++
++ return 1; /* can't continue */
++ }
+
+ curl = curl_easy_init();
+ if(curl) {