From: Andre Noll Date: Fri, 2 Jan 2015 19:52:52 +0000 (+0000) Subject: daemon.c: Avoid setlinebuf(). X-Git-Tag: v0.5.4~26 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=4d3eeacf793e321b9bcf27880eceef6e1d4db419 daemon.c: Avoid setlinebuf(). Using setvbuf() is equivalent, and more portable. See setbuf(3) for details. --- diff --git a/daemon.c b/daemon.c index b0d8fd74..8dd4d37e 100644 --- a/daemon.c +++ b/daemon.c @@ -223,7 +223,8 @@ void daemon_open_log_or_die(void) strerror(errno)); exit(EXIT_FAILURE); } - setlinebuf(me->logfile); + /* equivalent to setlinebuf(), but portable */ + setvbuf(me->logfile, NULL, _IOLBF, 0); } /**