|
|
- From ec9ba68b495b4d866b3f8542ff054541aaae87fd Mon Sep 17 00:00:00 2001
- From: Brent Cook <busterb@gmail.com>
- Date: Mon, 12 Jan 2015 21:16:54 -0600
- Subject: [PATCH 03/12] Use LOG_NTP syslog facility if it is available
-
- FreeBSD PR: 114191
- Submitted by: Robert Archer <freebsd@deathbeforedecaf.net>
- ---
- 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 <sys/socket.h>
- -
- +#include <netinet/in.h>
- #include <errno.h>
- #include <netdb.h>
- #include <pwd.h>
- @@ -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();
- }
- --
- 2.6.3
-
|