0003-Zap-double-definition-of-conf-and-make-ibuf_dns-static-to-avoid-double.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. From 956b4239d919d6922b9ba6ef39be0d1753f8ff34 Mon Sep 17 00:00:00 2001
  2. From: otto <>
  3. Date: Sat, 11 Apr 2020 07:49:48 +0000
  4. Subject: [PATCH] Zap double definition of conf and make ibuf_dns static to
  5. avoid double definition; from Michael Forney
  6. [Retrieved (and backported by updating paths and dropping date and
  7. version updates) from:
  8. https://github.com/openntpd-portable/openntpd-openbsd/commit/956b4239d919d6922b9ba6ef39be0d1753f8ff34]
  9. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  10. ---
  11. src/usr.sbin/ntpd/ntp.c | 4 ++--
  12. src/usr.sbin/ntpd/ntp_dns.c | 4 ++--
  13. src/usr.sbin/ntpd/parse.y | 3 +--
  14. 3 files changed, 5 insertions(+), 6 deletions(-)
  15. diff --git a/src/ntp.c b/src/ntp.c
  16. index ea9a4e922..ec3d6bc43 100644
  17. --- a/src/ntp.c
  18. +++ b/src/ntp.c
  19. @@ -42,7 +42,7 @@
  20. volatile sig_atomic_t ntp_quit = 0;
  21. struct imsgbuf *ibuf_main;
  22. -struct imsgbuf *ibuf_dns;
  23. +static struct imsgbuf *ibuf_dns;
  24. struct ntpd_conf *conf;
  25. struct ctl_conns ctl_conns;
  26. u_int peer_cnt;
  27. diff --git a/src/ntp_dns.c b/src/ntp_dns.c
  28. index 2e1a97833..88391801c 100644
  29. --- a/src/ntp_dns.c
  30. +++ b/src/ntp_dns.c
  31. @@ -39,7 +39,7 @@
  32. #include "ntpd.h"
  33. volatile sig_atomic_t quit_dns = 0;
  34. -struct imsgbuf *ibuf_dns;
  35. +static struct imsgbuf *ibuf_dns;
  36. void sighdlr_dns(int);
  37. int dns_dispatch_imsg(struct ntpd_conf *);
  38. diff --git a/src/parse.y b/src/uparse.y
  39. index 8d7ab09de..81d19bbff 100644
  40. --- a/src/parse.y
  41. +++ b/src/parse.y
  42. @@ -57,7 +57,6 @@ int lgetc(int);
  43. int lungetc(int);
  44. int findeol(void);
  45. -struct ntpd_conf *conf;
  46. struct sockaddr_in query_addr4;
  47. struct sockaddr_in6 query_addr6;
  48. int poolseqnum;