From: Yang Tse Date: Fri, 12 Sep 2008 03:24:27 +0000 (+0000) Subject: ANSI C compatibility fix X-Git-Tag: curl-7_19_1~375 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2bcd13aaee0476a6b3e63cb600bad2dd0ca593f2;p=thirdparty%2Fcurl.git ANSI C compatibility fix --- diff --git a/lib/file.c b/lib/file.c index 5e652001b9..9b9ef2be39 100644 --- a/lib/file.c +++ b/lib/file.c @@ -333,7 +333,8 @@ static CURLcode file_upload(struct connectdata *conn) failf(data, "Can't open %s for writing", file->path); return CURLE_WRITE_ERROR; } - fp = fdopen(fd, "wb"); + close(fd); + fp = fopen(file->path, "wb"); } if(!fp) {