diff --git a/src/tools/singlejar/output_jar.cc b/src/tools/singlejar/output_jar.cc index 1bd78daa7b9c9c..aec2cc15a395f5 100644 --- a/src/tools/singlejar/output_jar.cc +++ b/src/tools/singlejar/output_jar.cc @@ -275,7 +275,7 @@ bool OutputJar::Open() { } outpos_ = 0; buffer_.reset(new char[kBufferSize]); - setbuffer(file_, buffer_.get(), kBufferSize); + setvbuf(file_, buffer_.get(), _IOFBF, kBufferSize); if (options_->verbose) { fprintf(stderr, "Writing to %s\n", path()); }