diff options
-rw-r--r-- | miscutils/time.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/miscutils/time.c b/miscutils/time.c index e24221341..09a474979 100644 --- a/miscutils/time.c +++ b/miscutils/time.c | |||
@@ -471,6 +471,9 @@ int time_main(int argc UNUSED_PARAM, char **argv) | |||
471 | /* $TIME has lowest prio (-v,-p,-f FMT override it) */ | 471 | /* $TIME has lowest prio (-v,-p,-f FMT override it) */ |
472 | const char *output_format = getenv("TIME") ? : default_format; | 472 | const char *output_format = getenv("TIME") ? : default_format; |
473 | char *output_filename; | 473 | char *output_filename; |
474 | #if ENABLE_PLATFORM_MINGW32 | ||
475 | char buffer[256]; | ||
476 | #endif | ||
474 | int output_fd; | 477 | int output_fd; |
475 | int opt; | 478 | int opt; |
476 | int ex; | 479 | int ex; |
@@ -524,6 +527,9 @@ int time_main(int argc UNUSED_PARAM, char **argv) | |||
524 | 527 | ||
525 | /* Cheat. printf's are shorter :) */ | 528 | /* Cheat. printf's are shorter :) */ |
526 | xdup2(output_fd, STDOUT_FILENO); | 529 | xdup2(output_fd, STDOUT_FILENO); |
530 | #if ENABLE_PLATFORM_MINGW32 | ||
531 | setvbuf(stdout, buffer, _IOFBF, sizeof(buffer)); | ||
532 | #endif | ||
527 | summarize(output_format, argv, &res); | 533 | summarize(output_format, argv, &res); |
528 | 534 | ||
529 | ex = WEXITSTATUS(res.waitstatus); | 535 | ex = WEXITSTATUS(res.waitstatus); |