]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Fix compilation on Slackware 8.1 with the help of Andrew Hood
authorJohn Hay <hay@ntp.org>
Tue, 13 Aug 2002 18:03:41 +0000 (20:03 +0200)
committerJohn Hay <hay@ntp.org>
Tue, 13 Aug 2002 18:03:41 +0000 (20:03 +0200)
<mithrandir@alwaysonline.net.au>

bk: 3d5949fdqmJmISsQbJ3aAwEcD0RzSA

include/ntp_rfc2553.h
ntpdc/ntpdc.c
ntpq/ntpq.c

index 0f6ef05a90a03828b5fed2986a6642d051cbd1e6..b728de90f8cbb892db6d345802e8b9ff1b705824 100644 (file)
@@ -68,7 +68,7 @@
 #ifndef _NTP_RFC2553_H_
 #define _NTP_RFC2553_H_
 
-#ifdef _SS_MAXSIZE
+#if defined(_SS_MAXSIZE) || defined(_SS_SIZE)
 #define HAVE_IPV6
 #else
 
index 86993666500ef7f82323990aef469e1b720158af..3f642ac03bab3aba58c508453cc3082bd9381ccf 100644 (file)
@@ -412,7 +412,10 @@ openhost(
        char service[5];
 
        memset((char *)&hints, 0, sizeof(struct addrinfo));
-       hints.ai_flags = AI_ADDRCONFIG|AI_CANONNAME;
+       hints.ai_flags = AI_CANONNAME;
+#ifdef AI_ADDRCONFIG
+       hints.ai_flags |= AI_ADDRCONFIG;
+#endif
        hints.ai_family = ai_fam_templ;
        hints.ai_protocol = IPPROTO_UDP;
        hints.ai_socktype = SOCK_DGRAM;
@@ -1367,7 +1370,10 @@ getnetnum(
                           ? sizeof(struct sockaddr_in)
                           : sizeof(struct sockaddr_in6);
        memset((char *)&hints, 0, sizeof(struct addrinfo));
-       hints.ai_flags = AI_ADDRCONFIG|AI_CANONNAME;
+       hints.ai_flags = AI_CANONNAME;
+#ifdef AI_ADDRCONFIG
+       hints.ai_flags |= AI_ADDRCONFIG;
+#endif
        
        /* decodenetnum only works with addresses */
        if (decodenetnum(hname, num)) {
index c833405037243581fe546688346f8711290baa78..7eef4f9be23d00269a2c8ee08eb54ccf59d28e62 100644 (file)
@@ -593,7 +593,10 @@ openhost(
        char service[5];
 
        memset((char *)&hints, 0, sizeof(struct addrinfo));
-       hints.ai_flags = AI_ADDRCONFIG|AI_CANONNAME;
+       hints.ai_flags = AI_CANONNAME;
+#ifdef AI_ADDRCONFIG
+       hints.ai_flags |= AI_ADDRCONFIG;
+#endif
        hints.ai_family = ai_fam_templ;
        hints.ai_protocol = IPPROTO_UDP;
        hints.ai_socktype = SOCK_DGRAM;
@@ -1653,7 +1656,10 @@ getnetnum(
                           ? sizeof(struct sockaddr_in)
                           : sizeof(struct sockaddr_in6);
        memset((char *)&hints, 0, sizeof(struct addrinfo));
-       hints.ai_flags = AI_ADDRCONFIG|AI_CANONNAME;
+       hints.ai_flags = AI_CANONNAME;
+#ifdef AI_ADDRCONFIG
+       hints.ai_flags |= AI_ADDRCONFIG;
+#endif
        
        /* decodenetnum works with addresses only */
        if (decodenetnum(hname, num)) {