From f0b25d7b2c656a16532f006a13b0fd4b0e2dd757 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 26 Jul 2002 02:56:01 +0000 Subject: [PATCH] Conditionalize use of vsyslog --- libraries/liblber/debug.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/liblber/debug.c b/libraries/liblber/debug.c index 92b52d67b7..044b9795a3 100644 --- a/libraries/liblber/debug.c +++ b/libraries/liblber/debug.c @@ -164,7 +164,12 @@ void lutil_log_int( #ifdef LDAP_SYSLOG /* we're configured to use syslog */ if( use_syslog ) { +#ifdef HAVE_VSYSLOG vsyslog( debug2syslog(level), fmt, vl ); +#else + vsnprintf( data, sizeof(data), fmt, vl ); + syslog( debug2syslog(level), data ); +#endif return; } #endif @@ -317,6 +322,6 @@ void (lutil_debug)( int debug, int level, const char *fmt, ... ) fflush( log_file ); } - fputs( buffer, stderr ); + fputs( buffer, stderr ); va_end( vl ); } -- 2.39.5