[FFmpeg-devel] [PATCH] udp: Define _DARWIN_C_SOURCE

Ronald S. Bultje rsbultje
Wed Oct 6 21:05:34 CEST 2010


On Wed, Oct 6, 2010 at 2:59 PM, Martin Storsj? <martin at martin.st> wrote:
> On Wed, 6 Oct 2010, Martin Storsj? wrote:
>> On Wed, 6 Oct 2010, Ronald S. Bultje wrote:
>> > 2010/10/6 Martin Storsj? <martin at martin.st>:
>> > > The second priority is to get as much functionality enabled as possible on
>> > > each platform, and for that, a patch that adds __BSD_VISIBLE to udp.c (and
>> > > potentially to configure, if it's needed there, too) perhaps should be
>> > > considered.
>> >
>> > Should probably be in configure, similar to _DARWIN_C_SOURCE, for the
>> > same reason.
>> That of course depends on whether ipv6_mreq is available without the bsd
>> define or not. I'll see if I can get an FreeBSD 8.0 VM up and running to
>> check it out.
> Ok, I've got it up and running and tested.
> Concerning udp.c: The code compiles and works just fine out of the box.
> All the multicast conditional code blocks is left out, though. configure
> finds ipv6_mreq though. This can be fixed by adding a #define
> __BSD_VISIBLE 1 at the start of udp.c, nothing would be needed in
> configure.
> In general, though - ffmpeg doesn't build straight out of the box, some
> input and output devices fail to build. With --disable-devices I'm able to
> avoid this and test the compilation of the udp stuff.
> Also note what's written in the docs:
> http://www.ffmpeg.org/general.html#SEC17
>> FreeBSD will not compile out-of-the-box due to broken system headers.
>> Passing --extra-cflags=-D__BSD_VISIBLE to configure will work around the
>> problem. This may have unexpected sideeffects, so use it at your own
>> risk. If you care about FreeBSD, please make an attempt at getting the
>> system headers fixed.
> Given this, I don't see it as sensible to add similar local workarounds
> just for udp.c at the moment.

Can't we add __BSD_VISIBLE to configure extra_cflags when it detects
BSD? Mans/Diego?


More information about the ffmpeg-devel mailing list