diff --git a/exec.c b/exec.c index 7d3eb1ada..ef79d6d29 100644 --- a/exec.c +++ b/exec.c @@ -1491,7 +1491,8 @@ void cpu_set_log(int log_flags) static char logfile_buf[4096]; setvbuf(logfile, logfile_buf, _IOLBF, sizeof(logfile_buf)); } -#else +#elif !defined(_WIN32) + /* Win32 doesn't support line-buffering and requires size >= 2 */ setvbuf(logfile, NULL, _IOLBF, 0); #endif log_append = 1; diff --git a/vl.c b/vl.c index bdf2fe8f1..198523e31 100644 --- a/vl.c +++ b/vl.c @@ -5755,7 +5755,10 @@ int main(int argc, char **argv, char **envp) exit(1); } +#ifndef _WIN32 + /* Win32 doesn't support line-buffering and requires size >= 2 */ setvbuf(stdout, NULL, _IOLBF, 0); +#endif init_timers(); if (init_timer_alarm() < 0) {