From: Harlan Stenn Date: Thu, 24 Dec 2009 07:27:39 +0000 (-0500) Subject: System headers must come before ntp headers in ntp_intres.c X-Git-Tag: NTP_4_2_7P4~2^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e261c0ab6fe8a230b53d111b9ed922af00922e1;p=thirdparty%2Fntp.git System headers must come before ntp headers in ntp_intres.c bk: 4b3317ebT6_Kee7Qhda0D_VF4YAGKA --- diff --git a/ChangeLog b/ChangeLog index 83fa2c107..9b7f10885 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ * [Bug 1426] scripts/VersionName needs . on the search path. * [Bug 1427] quote missing in ./build - shows up on NetBSD. * [Bug 1428] Use AC_HEADER_RESOLV to fix breaks from resolv.h +* [Bug 1431] System headers must come before ntp headers in ntp_intres.c . --- (4.2.6p1-RC1) 2009/12/20 Released by Harlan Stenn diff --git a/include/Makefile.am b/include/Makefile.am index 206021266..80113226c 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -34,6 +34,7 @@ noinst_HEADERS = \ ntp_filegen.h \ ntp_fp.h \ ntp_if.h \ + ntp_intres.h \ ntp_io.h \ ntp_lineedit.h \ ntp_lists.h \ diff --git a/include/ntp_config.h b/include/ntp_config.h index 4a9be31a4..bb002415b 100644 --- a/include/ntp_config.h +++ b/include/ntp_config.h @@ -53,16 +53,6 @@ #define FREE_CFG_T #endif -/* - * Some systems do not support fork() and don't have an alternate - * threads implementation of ntp_intres. Such systems are limited - * to using numeric IP addresses. - */ -#if defined(VMS) || defined (SYS_VXWORKS) || \ - (!defined(HAVE_FORK) && !defined(SYS_WINNT)) -#define NO_INTRES -#endif - /* Limits */ #define MAXLINE 1024 diff --git a/include/ntp_intres.h b/include/ntp_intres.h new file mode 100644 index 000000000..1072833aa --- /dev/null +++ b/include/ntp_intres.h @@ -0,0 +1,14 @@ +#ifndef NTP_INTRES_H +#define NTP_INTRES_H + +/* + * Some systems do not support fork() and don't have an alternate + * threads implementation of ntp_intres. Such systems are limited + * to using numeric IP addresses. + */ +#if defined(VMS) || defined (SYS_VXWORKS) || \ + (!defined(HAVE_FORK) && !defined(SYS_WINNT)) +#define NO_INTRES +#endif + +#endif /* !defined(NTP_INTRES_H) */ diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c index 414dcabf1..7cc93f172 100644 --- a/ntpd/ntp_config.c +++ b/ntpd/ntp_config.c @@ -28,6 +28,7 @@ #include "ntpsim.h" #include "ntpd-opts.h" #include +#include "ntp_intres.h" #include #include diff --git a/ntpd/ntp_intres.c b/ntpd/ntp_intres.c index bb8f107af..f98cc99e2 100644 --- a/ntpd/ntp_intres.c +++ b/ntpd/ntp_intres.c @@ -20,15 +20,9 @@ # include #endif -#include "ntp_machine.h" -#include "ntpd.h" -#include "ntp_io.h" -#include "ntp_request.h" -#include "ntp_stdlib.h" -#include "ntp_syslog.h" -#include "ntp_config.h" +#include "ntp_intres.h" -#ifndef NO_INTRES /* from ntp_config.h */ +#ifndef NO_INTRES #include #include @@ -61,6 +55,14 @@ # include #endif +#include "ntp_machine.h" +#include "ntpd.h" +#include "ntp_io.h" +#include "ntp_request.h" +#include "ntp_stdlib.h" +#include "ntp_syslog.h" +#include "ntp_config.h" + #include #include