diff options
author | Damien Miller <djm@mindrot.org> | 2004-02-18 12:59:43 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2004-02-18 12:59:43 +0100 |
commit | 051b0acbbce7218dcfa1521ad22f860aa20b3008 (patch) | |
tree | a768f24c43b82654fc0684b5ac30be541b1ff21c /log.c | |
parent | - (djm) [log.c] Correct use of HAVE_OPENLOG_R (diff) | |
download | openssh-051b0acbbce7218dcfa1521ad22f860aa20b3008.tar.xz openssh-051b0acbbce7218dcfa1521ad22f860aa20b3008.zip |
- (djm) [log.c] Tighten openlog_r tests
Diffstat (limited to 'log.c')
-rw-r--r-- | log.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -265,7 +265,7 @@ log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr) void do_log(LogLevel level, const char *fmt, va_list args) { -#ifdef HAVE_OPENLOG_R +#if defined(HAVE_OPENLOG_R) && defined(SYSLOG_DATA_INIT) struct syslog_data sdata = SYSLOG_DATA_INIT; #endif char msgbuf[MSGBUFSIZ]; @@ -321,7 +321,7 @@ do_log(LogLevel level, const char *fmt, va_list args) snprintf(msgbuf, sizeof msgbuf, "%s\r\n", fmtbuf); write(STDERR_FILENO, msgbuf, strlen(msgbuf)); } else { -#ifdef HAVE_OPENLOG_R +#if defined(HAVE_OPENLOG_R) && defined(SYSLOG_DATA_INIT) openlog_r(argv0 ? argv0 : __progname, LOG_PID, log_facility, &sdata); syslog_r(pri, &sdata, "%.500s", fmtbuf); closelog_r(&sdata); |