support: don't set linebuf on stderr

Don't set linebuf on our stderr fallback file.

Fixes #3164
This commit is contained in:
Wim Taymans 2023-04-17 21:22:26 +02:00
parent bbf0ed063e
commit 312af1103e

View file

@ -348,6 +348,9 @@ impl_init(const struct spa_handle_factory *factory,
} }
if (this->file == NULL) if (this->file == NULL)
this->file = stderr; this->file = stderr;
else
setlinebuf(this->file);
if (!isatty(fileno(this->file))) if (!isatty(fileno(this->file)))
this->colors = false; this->colors = false;
@ -355,8 +358,6 @@ impl_init(const struct spa_handle_factory *factory,
spa_log_debug(&this->log, NAME " %p: initialized", this); spa_log_debug(&this->log, NAME " %p: initialized", this);
setlinebuf(this->file);
return 0; return 0;
} }