diff options
-rw-r--r-- | applets/applet_tables.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/applets/applet_tables.c b/applets/applet_tables.c index 7ba929b12..b1dafccd2 100644 --- a/applets/applet_tables.c +++ b/applets/applet_tables.c | |||
@@ -103,6 +103,9 @@ int main(int argc, char **argv) | |||
103 | if (i < 0) | 103 | if (i < 0) |
104 | return 1; | 104 | return 1; |
105 | dup2(i, 1); | 105 | dup2(i, 1); |
106 | #ifdef __MINGW32__ | ||
107 | close(i); | ||
108 | #endif | ||
106 | 109 | ||
107 | /* Keep in sync with include/busybox.h! */ | 110 | /* Keep in sync with include/busybox.h! */ |
108 | 111 | ||
@@ -236,8 +239,14 @@ int main(int argc, char **argv) | |||
236 | 239 | ||
237 | if (fclose(stdout)) | 240 | if (fclose(stdout)) |
238 | return 1; | 241 | return 1; |
242 | #ifdef __MINGW32__ | ||
243 | unlink(argv[1]); | ||
244 | #endif | ||
239 | if (rename(tmp1, argv[1])) | 245 | if (rename(tmp1, argv[1])) |
240 | return 1; | 246 | return 1; |
247 | #ifdef __MINGW32__ | ||
248 | unlink(argv[2]); | ||
249 | #endif | ||
241 | if (rename(tmp2, argv[2])) | 250 | if (rename(tmp2, argv[2])) |
242 | return 1; | 251 | return 1; |
243 | return 0; | 252 | return 0; |