chmod is more portable than fchmod.

diff --git a/tools/winegcc/utils.c b/tools/winegcc/utils.c
index 246dc61..5c4fa5d 100644
--- a/tools/winegcc/utils.c
+++ b/tools/winegcc/utils.c
@@ -198,8 +198,8 @@
 	error ("Can not create %s.", name);
     vfprintf(file, fmt, ap);
     va_end(ap);
-    fchmod(fileno(file), mode);
     fclose(file);
+    chmod(name, mode);
 }
 
 file_type get_file_type(const char* filename)