summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-12-19 19:18:37 +0000
committerJeremy Allison <jra@samba.org>2001-12-19 19:18:37 +0000
commit2fe6d5d5a1025007a3e67d6040c1962734cbb6ea (patch)
tree894c0843f9955522bca0bdb03bfa150c00408cc7 /source3/lib
parenta784fce1090f4c67f064cb1230a32c574ecc652d (diff)
downloadsamba-2fe6d5d5a1025007a3e67d6040c1962734cbb6ea.tar.gz
samba-2fe6d5d5a1025007a3e67d6040c1962734cbb6ea.tar.bz2
samba-2fe6d5d5a1025007a3e67d6040c1962734cbb6ea.zip
Added AC_CHECK_FUNCS(syslog vsyslog).
nsswitch code uses vsyslog without checking for it. Provide replacement for vsyslog in lib/snprintf if not found by configure. Jeremy. (This used to be commit ab2e55cdb376d6699c9a09fac243fba7d3840447)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/snprintf.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/lib/snprintf.c b/source3/lib/snprintf.c
index 7d6da95f8e..900ba381a0 100644
--- a/source3/lib/snprintf.c
+++ b/source3/lib/snprintf.c
@@ -811,6 +811,20 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
}
#endif
+#ifndef HAVE_VSYSLOG
+#ifdef HAVE_SYSLOG
+ void vsyslog (int facility_priority, char *format, va_list arglist)
+{
+ char *msg = NULL;
+ vasprintf(&msg, format, argslist);
+ if (!msg)
+ return;
+ syslog(facility_priority, "%s", msg);
+ free(msg);
+}
+#endif /* HAVE_SYSLOG */
+#endif /* HAVE_VSYSLOG */
+
#ifdef TEST_SNPRINTF
int sprintf(char *str,const char *fmt,...);