aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/bus
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2013-10-29 10:58:39 +0100
committerMartin Willi <martin@revosec.ch>2014-06-04 15:53:04 +0200
commitb9dca7057cd4423555ae87d64c1a2cf272c9c87c (patch)
tree56d62f84da07e5443d30c8bd82d898970aff7658 /src/libcharon/bus
parentefcf249aebe395e196237e87bd34232f84559112 (diff)
downloadstrongswan-b9dca7057cd4423555ae87d64c1a2cf272c9c87c.tar.bz2
strongswan-b9dca7057cd4423555ae87d64c1a2cf272c9c87c.tar.xz
filelog: Ignore flush_line option if setlinebuf() not supported
Diffstat (limited to 'src/libcharon/bus')
-rw-r--r--src/libcharon/bus/listeners/file_logger.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcharon/bus/listeners/file_logger.c b/src/libcharon/bus/listeners/file_logger.c
index 68a386d11..c86cff132 100644
--- a/src/libcharon/bus/listeners/file_logger.c
+++ b/src/libcharon/bus/listeners/file_logger.c
@@ -214,10 +214,12 @@ METHOD(file_logger_t, open_, void,
this->filename, strerror(errno));
return;
}
+#ifdef HAVE_SETLINEBUF
if (flush_line)
{
setlinebuf(file);
}
+#endif /* HAVE_SETLINEBUF */
}
this->lock->write_lock(this->lock);
close_file(this);