diff options
author | Martin Storsjö <martin@martin.st> | 2010-09-20 06:38:40 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-09-20 06:38:40 +0000 |
commit | 63206a8ffb131e03c04173c1426090532d276ee9 (patch) | |
tree | f0e1051d59631cfb9b6f0efa784f4e767b1dc52b /libavformat/udp.c | |
parent | f41237c9dbe9751ef025812edebdec762797e57d (diff) | |
download | ffmpeg-63206a8ffb131e03c04173c1426090532d276ee9.tar.gz |
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.
Originally committed as revision 25147 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/udp.c')
-rw-r--r-- | libavformat/udp.c | 4 |
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; |