]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - daemon.c
daemon.c: Avoid setlinebuf().
[paraslash.git] / daemon.c
index 3879c0d8c81e1235298aa74b923a7ef968160b24..8dd4d37e4824c8b8579a96cb338bb1ba980d8d4a 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1997-2014 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1997-2014 Andre Noll <maan@tuebingen.mpg.de>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -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);
 }
 
 /**