summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/udp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 3636d8c8ff..83e8b379eb 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -96,7 +96,7 @@ static int udp_join_multicast_group(int sockfd, struct sockaddr *addr)
}
}
#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 @@ static int udp_leave_multicast_group(int sockfd, struct sockaddr *addr)
}
}
#endif
-#if HAVE_STRUCT_IPV6_MREQ
+#if HAVE_STRUCT_IPV6_MREQ && defined(IPPROTO_IPV6)
if (addr->sa_family == AF_INET6) {
struct ipv6_mreq mreq6;