From 2bcd13aaee0476a6b3e63cb600bad2dd0ca593f2 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 12 Sep 2008 03:24:27 +0000 Subject: [PATCH] ANSI C compatibility fix --- lib/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/file.c b/lib/file.c index 5e652001b..9b9ef2be3 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) {