X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Futils_dns.c;h=fcc65a56771021e184ce23addd4a508cef3f9622;hb=a8df5fa185c4edc65b184d6a8326ce03479ffe5f;hp=655c61edf0764cc9911bab2a71e6556bc83405a0;hpb=96e0f2341bace029acefe0a88bab96ae326c0ff5;p=collectd.git diff --git a/src/utils_dns.c b/src/utils_dns.c index 655c61ed..fcc65a56 100644 --- a/src/utils_dns.c +++ b/src/utils_dns.c @@ -129,6 +129,10 @@ # error "`struct udphdr' is unusable." #endif +#if HAVE_NETINET_IP6_H && HAVE_STRUCT_IP6_EXT +# define HAVE_IPV6 1 +#endif + #include "utils_dns.h" /* @@ -444,7 +448,7 @@ handle_udp(const struct udphdr *udp, int len) return 1; } -#if HAVE_NETINET_IP6_H +#if HAVE_IPV6 static int handle_ipv6 (struct ip6_hdr *ipv6, int len) { @@ -513,16 +517,16 @@ handle_ipv6 (struct ip6_hdr *ipv6, int len) return (1); /* Success */ } /* int handle_ipv6 */ -/* #endif HAVE_NETINET_IP6_H */ +/* #endif HAVE_IPV6 */ -#else /* if !HAVE_NETINET_IP6_H */ +#else /* if !HAVE_IPV6 */ static int handle_ipv6 (__attribute__((unused)) void *pkg, __attribute__((unused)) int len) { return (0); } -#endif /* !HAVE_NETINET_IP6_H */ +#endif /* !HAVE_IPV6 */ static int handle_ip(const struct ip *ip, int len)