[FFmpeg-devel] [fixed] FreeBSD 8.1, --disable-network due to in.h not included.
Måns Rullgård
mans
Tue Sep 7 13:34:03 CEST 2010
Martin Storsj? <martin at martin.st> writes:
> On Tue, 7 Sep 2010, Igor 'Lo' (?.L.) wrote:
>
>> Hi all.
>> Had fixed this:
>> libavformat/udp.c:77: error: 'IPPROTO_IPV6' undeclared (first use in
>> this function)
>
> I think this issue can be fixed using the attached patch (by not compiling
> such code unless the IPPROTO_IPV6 define is visible).
>
> // Martin
>
> From 7ca45311458b096bdf256aef2b9518637274336e Mon Sep 17 00:00:00 2001
> From: Martin Storsjo <martin at martin.st>
> Date: Tue, 7 Sep 2010 13:56:22 +0300
> Subject: [PATCH] Check for the IPPROTO_IPV6 define before using it
>
> ---
> libavformat/udp.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/udp.c b/libavformat/udp.c
> index 3636d8c..83e8b37 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;
I don't really like disabling something that is supported, just hidden
by retarded system headers. Then again, it's BSD so I don't care that
much.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list