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

9 years ago
9 years ago
  1. From 889a119fa8e26239f09c38f55f5570b322793faf Mon Sep 17 00:00:00 2001
  2. From: Brent Cook <busterb@gmail.com>
  3. Date: Mon, 12 Jan 2015 21:16:54 -0600
  4. Subject: [PATCH 05/12] 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