From 889a119fa8e26239f09c38f55f5570b322793faf Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Mon, 12 Jan 2015 21:16:54 -0600 Subject: [PATCH 05/12] Use LOG_NTP syslog facility if it is available FreeBSD PR: 114191 Submitted by: Robert Archer --- src/usr.sbin/ntpd/log.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/usr.sbin/ntpd/log.c b/src/usr.sbin/ntpd/log.c index 1d8304b..5d34709 100644 --- a/src/usr.sbin/ntpd/log.c +++ b/src/usr.sbin/ntpd/log.c @@ -17,7 +17,7 @@ */ #include - +#include #include #include #include @@ -30,6 +30,10 @@ #include "log.h" +#ifndef LOG_NTP +#define LOG_NTP LOG_DAEMON +#endif + #define TRACE_DEBUG 0x1 static int foreground; @@ -39,7 +43,6 @@ void vlog(int, const char *, va_list); void logit(int, const char *, ...) __attribute__((format (printf, 2, 3))); - void log_init(int n_foreground) { @@ -47,7 +50,7 @@ log_init(int n_foreground) foreground = n_foreground; if (! foreground) - openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON); + openlog(__progname, LOG_PID | LOG_NDELAY, LOG_NTP); tzset(); } -- 1.9.1