Fix setlinebuf() on Windows

This commit is contained in:
Roger A. Light 2023-08-15 16:19:39 +01:00
parent 3ab0a9a3fd
commit 9109e9e0e2

View File

@ -131,7 +131,7 @@ int log__init(struct mosquitto__config *config)
} }
} }
if(log_destinations & MQTT3_LOG_STDOUT){ if(log_destinations & MQTT3_LOG_STDOUT){
setlinebuf(stdout); setvbuf(stdout, NULL, _IOLBF, 0);
} }
#ifdef WITH_DLT #ifdef WITH_DLT
if(log_destinations & MQTT3_LOG_DLT){ if(log_destinations & MQTT3_LOG_DLT){