]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Fix the macros in ntp_rfc2553.h by including network headers and make ntp_io.c condit...
authorDanny Mayer <mayer@ntp.org>
Fri, 26 Mar 2004 22:53:26 +0000 (17:53 -0500)
committerDanny Mayer <mayer@ntp.org>
Fri, 26 Mar 2004 22:53:26 +0000 (17:53 -0500)
bk: 4064b466Ba3qNGvvz4KyX3jBABSUMA

include/ntp_rfc2553.h
ntpd/ntp_io.c

index fe629ed07f203b022b0220c7eea519f806d48cf8..223c839a66915a9896039de964759277b55bc1d3 100644 (file)
 #include <config.h>
 
 #include "ntp_types.h"
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN_SYSTM_H
+# include <netinet/in_systm.h>
+#else /* Some old linux systems at least have in_system.h instead. */
+# ifdef HAVE_NETINET_IN_SYSTEM_H
+#  include <netinet/in_system.h>
+# endif
+#endif /* HAVE_NETINET_IN_SYSTM_H */
+#ifdef HAVE_NETINET_IP_H
+# include <netinet/ip.h>
+#endif
 
 /*
  * If various macros are not defined we need to define them
index ca5a06ffbc00fb67326441ee309646b860446aec..0b71e790726750130e69f2b1f424875e9d599ebb 100644 (file)
@@ -754,7 +754,7 @@ io_multicast_add(
                 add_addr_to_list(&addr, i);
                break;
 
-#ifdef ISC_PLATFORM_HAVEIPV6
+#if defined(ISC_PLATFORM_HAVEIPV6) && defined(IPV6_JOIN_GROUP) && defined(IPV6_LEAVE_GROUP)
        case AF_INET6 :
 
                iaddr6 = ((struct sockaddr_in6*)&addr)->sin6_addr;
@@ -946,7 +946,7 @@ io_multicast_del(
                }
                break;
 
-#ifdef ISC_PLATFORM_HAVEIPV6
+#if defined(ISC_PLATFORM_HAVEIPV6) && defined(IPV6_JOIN_GROUP) && defined(IPV6_LEAVE_GROUP)
        case AF_INET6 :
                haddr6 = ((struct sockaddr_in6*)&addr)->sin6_addr;