]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 432] clean up in6addrany usage
authorHarlan Stenn <stenn@ntp.org>
Tue, 24 May 2005 07:36:59 +0000 (03:36 -0400)
committerHarlan Stenn <stenn@ntp.org>
Tue, 24 May 2005 07:36:59 +0000 (03:36 -0400)
bk: 4292d99btSc72HHtyyLr8GKoO19YQQ

libisc/netaddr.c
libntp/ntp_rfc2553.c
ntpd/ntp_intres.c

index fef54390a31d2b25684f19e02c6a66673731caf6..1d9cafd6117e0ce700094dc2e50e6d9761840ebe 100644 (file)
@@ -290,12 +290,14 @@ isc_netaddr_any(isc_netaddr_t *netaddr) {
        netaddr->type.in.s_addr = INADDR_ANY;
 }
 
+#ifdef ISC_PLATFORM_HAVEIPV6
 void
 isc_netaddr_any6(isc_netaddr_t *netaddr) {
        memset(netaddr, 0, sizeof(*netaddr));
        netaddr->family = AF_INET6;
        netaddr->type.in6 = in6addr_any;
 }
+#endif
 
 isc_boolean_t
 isc_netaddr_ismulticast(isc_netaddr_t *na) {
index c82b96dfedaa78e3011f3caff9d3cb1e6c1154fb..b2e730a85431434604654d8eaf596431b950504b 100644 (file)
 #include "ntp_stdlib.h"
 #include "ntp_string.h"
 
-#ifdef ISC_PLATFORM_NEEDIN6ADDRANY
-
-#if defined(SYS_WINNT)
-/* XXX This is the preferred way, but for some reason the SunOS compiler
- * does not like it.
- */
-const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
-#else
-const struct in6_addr in6addr_any;
-#endif
-#endif
-
 #ifndef ISC_PLATFORM_HAVEIPV6
 
 static char *ai_errlist[] = {
index 409ad21ec2ad820fe6072a77d20bbb0269201358..4a480b882fa1c385106385f99534da463141ab0a 100644 (file)
@@ -413,7 +413,9 @@ addentry(
        ce = (struct conf_entry *)emalloc(sizeof(struct conf_entry));
        ce->ce_name = cp;
        ce->ce_peeraddr = 0;
+#ifdef ISC_PLATFORM_HAVEIPV6
        ce->ce_peeraddr6 = in6addr_any;
+#endif
        ANYSOCK(&ce->peer_store);
        ce->ce_hmode = (u_char)mode;
        ce->ce_version = (u_char)version;