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

  1. From 245c60ac577e8969e1c235c5e1388d2f5b92278e Mon Sep 17 00:00:00 2001
  2. From: Brent Cook <busterb@gmail.com>
  3. Date: Tue, 30 Dec 2014 09:00:12 -0600
  4. Subject: [PATCH 06/11] Use LOG_NTP syslog facility if it is available
  5. FreeBSD PR: 114191
  6. Submitted by: Robert Archer <freebsd@deathbeforedecaf.net>
  7. ---
  8. src/usr.sbin/ntpd/log.c | 9 ++++++---
  9. 1 file changed, 6 insertions(+), 3 deletions(-)
  10. diff --git a/src/usr.sbin/ntpd/log.c b/src/usr.sbin/ntpd/log.c
  11. index 1d8304b..5d34709 100644
  12. --- a/src/usr.sbin/ntpd/log.c
  13. +++ b/src/usr.sbin/ntpd/log.c
  14. @@ -17,7 +17,7 @@
  15. */
  16. #include <sys/socket.h>
  17. -
  18. +#include <netinet/in.h>
  19. #include <errno.h>
  20. #include <netdb.h>
  21. #include <pwd.h>
  22. @@ -30,6 +30,10 @@
  23. #include "log.h"
  24. +#ifndef LOG_NTP
  25. +#define LOG_NTP LOG_DAEMON
  26. +#endif
  27. +
  28. #define TRACE_DEBUG 0x1
  29. static int foreground;
  30. @@ -39,7 +43,6 @@ void vlog(int, const char *, va_list);
  31. void logit(int, const char *, ...)
  32. __attribute__((format (printf, 2, 3)));
  33. -
  34. void
  35. log_init(int n_foreground)
  36. {
  37. @@ -47,7 +50,7 @@ log_init(int n_foreground)
  38. foreground = n_foreground;
  39. if (! foreground)
  40. - openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
  41. + openlog(__progname, LOG_PID | LOG_NDELAY, LOG_NTP);
  42. tzset();
  43. }
  44. --
  45. 1.9.1