From c161b1c4b1fcb70a30b5898a7c6f25c6a6058212 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Mon, 9 Oct 2023 09:57:56 +0200 Subject: [PATCH] util/setvbuf: Respect buf argument --- src/util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.cc b/src/util.cc index 9d38ea69ca..6536081a34 100644 --- a/src/util.cc +++ b/src/util.cc @@ -1025,7 +1025,7 @@ void set_thread_name(const char* name, pthread_t tid) int setvbuf(FILE* stream, char* buf, int type, size_t size) { #ifndef _MSC_VER - return ::setvbuf(stream, NULL, type, size); + return ::setvbuf(stream, buf, type, size); #else // TODO: this turns off buffering altogether because Windows wants us to pass a valid // buffer and length if we're going to pass one of the other modes. We need to