diff options
Diffstat (limited to 'lib/vsyslog.c')
-rw-r--r-- | lib/vsyslog.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/vsyslog.c b/lib/vsyslog.c new file mode 100644 index 0000000..5878cff --- /dev/null +++ b/lib/vsyslog.c @@ -0,0 +1,15 @@ +#include "../include/sane/config.h" + +#ifndef HAVE_VSYSLOG + +#include <stdio.h> +#include <stdarg.h> + +void vsyslog(int priority, const char *format, va_list args) +{ + char buf[1024]; + vsnprintf(buf, sizeof(buf), format, args); + syslog(priority, "%s", buf); +} + +#endif /* !HAVE_VSYSLOG */ |