[FFmpeg-devel] [fixed] FreeBSD 8.1, --disable-network due to in.h not included.

Ronald S. Bultje rsbultje
Tue Sep 7 14:29:58 CEST 2010


Hi,

2010/9/7 M?ns Rullg?rd <mans at mansr.com>:
> Martin Storsj? <martin at martin.st> writes:
>> On Tue, 7 Sep 2010, Igor 'Lo' (?.L.) wrote:
>>> 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.

+0.5, it'd be nice if we could somehow work around BSD brokenness
without too much hackiness...

Ronald



More information about the ffmpeg-devel mailing list