# HG changeset patch # User mstorsjo # Date 1284964720 0 # Node ID 1e6ebac87d447a1913b549854209f9d998685041 # Parent 2697448798ee43fbe05a95eae7afba513807ece6 Check for the IPPROTO_IPV6 define before using it This fixes building on FreeBSD in some configurations, if the IPv6 multicast structs are available, but IPPROTO_IPV6 isn't defined. diff -r 2697448798ee -r 1e6ebac87d44 udp.c --- a/udp.c Wed Sep 15 17:39:25 2010 +0000 +++ b/udp.c Mon Sep 20 06:38:40 2010 +0000 @@ -96,7 +96,7 @@ } } #endif -#if HAVE_STRUCT_IPV6_MREQ +#if HAVE_STRUCT_IPV6_MREQ && defined(IPPROTO_IPV6) if (addr->sa_family == AF_INET6) { struct ipv6_mreq mreq6; @@ -125,7 +125,7 @@ } } #endif -#if HAVE_STRUCT_IPV6_MREQ +#if HAVE_STRUCT_IPV6_MREQ && defined(IPPROTO_IPV6) if (addr->sa_family == AF_INET6) { struct ipv6_mreq mreq6;