From: Danny Mayer Date: Sat, 2 Jan 2010 04:49:35 +0000 (-0500) Subject: Fixes for bugs 1448-1450 X-Git-Tag: NTP_4_2_6P1_RC3~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2798440283bccc8fca6ea266a2b920d96a74fb79;p=thirdparty%2Fntp.git Fixes for bugs 1448-1450 bk: 4b3ed05fWV4irQh_HcEYRJ1WgB2uRw --- diff --git a/ChangeLog b/ChangeLog index a7f7d354c..c20660184 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +* [Bug 1448] Some macros not correctly conditionally or absolutely defined + on Windows +* [Bug 1449] ntpsim.h should be conditionally in ntp_config.c +* [Bug 1450] Option to exclude warnings not unconditionally defined on Windows --- * [Bug 1445] IRIX does not have -lcap or support linux capabilities. diff --git a/lib/isc/netaddr.c b/lib/isc/netaddr.c index 85dd53e03..cfd4991df 100644 --- a/lib/isc/netaddr.c +++ b/lib/isc/netaddr.c @@ -371,7 +371,7 @@ void isc_netaddr_any6(isc_netaddr_t *netaddr) { memset(netaddr, 0, sizeof(*netaddr)); netaddr->family = AF_INET6; - netaddr->type.in6 = in6addr_any; +/* netaddr->type.in6 = in6addr_any; Not strictly necessary */ } isc_boolean_t diff --git a/lib/isc/win32/include/isc/platform.h b/lib/isc/win32/include/isc/platform.h index 7faf7743b..d74fc76b0 100644 --- a/lib/isc/win32/include/isc/platform.h +++ b/lib/isc/win32/include/isc/platform.h @@ -30,11 +30,11 @@ *** Network. ***/ -#define ISC_PLATFORM_HAVEIPV6 #if _MSC_VER > 1200 +#define ISC_PLATFORM_HAVEIPV6 #define ISC_PLATFORM_HAVEIN6PKTINFO -#endif #define ISC_PLATFORM_HAVESCOPEID +#endif #define ISC_PLATFORM_NEEDPORTT #undef MSG_TRUNC #define ISC_PLATFORM_NEEDNTOP diff --git a/lib/isc/win32/interfaceiter.c b/lib/isc/win32/interfaceiter.c index b71cb245a..903fa213d 100644 --- a/lib/isc/win32/interfaceiter.c +++ b/lib/isc/win32/interfaceiter.c @@ -98,7 +98,9 @@ get_addr(unsigned int family, isc_netaddr_t *dst, struct sockaddr *src) { memcpy(&dst->type.in6, &((struct sockaddr_in6 *) src)->sin6_addr, sizeof(struct in6_addr)); +#ifdef ISC_PLATFORM_HAVESCOPEID dst->zone = ((struct sockaddr_in6 *) src)->sin6_scope_id; +#endif break; default: INSIST(0); diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c index 9426e0a0f..ff616ea3a 100644 --- a/ntpd/ntp_config.c +++ b/ntpd/ntp_config.c @@ -25,8 +25,10 @@ #include "ntp_filegen.h" #include "ntp_stdlib.h" #include "ntp_assert.h" -#include "ntpsim.h" #include "ntpd-opts.h" +#ifdef SIM +#include "ntpsim.h" +#endif #include #include "ntp_intres.h" #include diff --git a/ports/winnt/include/config.h b/ports/winnt/include/config.h index d67968b3b..0a05788a8 100644 --- a/ports/winnt/include/config.h +++ b/ports/winnt/include/config.h @@ -140,10 +140,10 @@ extern int tty_open(char *, int, int); #define ISC_PLATFORM_HAVEIPV6 #define ISC_PLATFORM_HAVESCOPEID #define HAVE_STRUCT_SOCKADDR_STORAGE -#define NO_OPTION_NAME_WARNINGS +#define ISC_PLATFORM_HAVEIN6PKTINFO #endif /* in_addr6 / RFC2553-compliant IPv6 headers */ -#define ISC_PLATFORM_HAVEIN6PKTINFO +#define NO_OPTION_NAME_WARNINGS #if !defined( _W64 ) /* diff --git a/ports/winnt/vc6/libntp.dsp b/ports/winnt/vc6/libntp.dsp index 45bf21c7f..f209e179e 100644 --- a/ports/winnt/vc6/libntp.dsp +++ b/ports/winnt/vc6/libntp.dsp @@ -390,10 +390,6 @@ SOURCE=..\..\..\libntp\statestr.c # End Source File # Begin Source File -SOURCE=..\..\..\lib\isc\win32\stdime.c -# End Source File -# Begin Source File - SOURCE=..\libntp\syslog.c # End Source File # Begin Source File