diff --git a/ChangeLog b/ChangeLog index e46b10ff6..a61bddbf9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,7 @@ remove cruft left over from RhostsAuthentication removal; ok markus@ - (djm) [log.c] Correct use of HAVE_OPENLOG_R + - (djm) [log.c] Tighten openlog_r tests 20040217 - (djm) Simplify the license on code I have written. No code changes. @@ -1882,4 +1883,4 @@ - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. Report from murple@murple.net, diagnosis from dtucker@zip.com.au -$Id: ChangeLog,v 1.3238 2004/02/18 04:42:31 djm Exp $ +$Id: ChangeLog,v 1.3239 2004/02/18 11:59:43 djm Exp $ diff --git a/log.c b/log.c index e4ea99589..0c4d5123a 100644 --- a/log.c +++ b/log.c @@ -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);