filelog: Ignore flush_line option if setlinebuf() not supported
This commit is contained in:
parent
efcf249aeb
commit
b9dca7057c
|
@ -568,7 +568,7 @@ AC_CHECK_FUNC(
|
|||
)
|
||||
|
||||
AC_CHECK_FUNCS(prctl mallinfo getpass closefrom getpwnam_r getgrnam_r getpwuid_r)
|
||||
AC_CHECK_FUNCS(fmemopen funopen mmap memrchr syslog)
|
||||
AC_CHECK_FUNCS(fmemopen funopen mmap memrchr syslog setlinebuf)
|
||||
|
||||
AC_CHECK_HEADERS(sys/sockio.h glob.h net/if_tun.h linux/fib_rules.h)
|
||||
AC_CHECK_HEADERS(net/pfkeyv2.h netipsec/ipsec.h netinet6/ipsec.h linux/udp.h)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue