Portable build framework for OpenNTPD
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

55 lines
1.2 KiB

From 125039fad99de2ad2ac0c0738c692dae14c48bfb Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Mon, 12 Jan 2015 21:16:54 -0600
Subject: [PATCH 05/13] 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();
}
--
1.9.1