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

Martin Storsjö martin
Wed Oct 6 14:30:57 CEST 2010


On Tue, 5 Oct 2010, Martin Storsj? wrote:

> On Tue, 5 Oct 2010, M?ns Rullg?rd wrote:
> 
> > Martin Storsj? <martin at martin.st> writes:
> > 
> > > On Tue, 5 Oct 2010, Ronald S. Bultje wrote:
> > >
> > >> On Tue, Oct 5, 2010 at 12:46 PM, Martin Storsj? <martin at martin.st> wrote:
> > >> > On Tue, 5 Oct 2010, Ronald S. Bultje wrote:
> > >> >> On Tue, Oct 5, 2010 at 12:37 PM, Martin Storsj? <martin at martin.st> wrote:
> > >> >> > And I guess we don't want to enable any such define globally for the whole
> > >> >> > build. Should we force users to manually specify _DARWIN_C_SOURCE via
> > >> >> > --extra-cflags if they really want this
> > >> >>
> > >> >> No.
> > >> >>
> > >> >> > or is there any way to enable
> > >> >> > this define only for one particular test in configure, where checking for
> > >> >> > ipv6_mreq?
> > >> >>
> > >> >> Why not use the current test, if it fails re-try it with
> > >> >> _DARWIN_C_SOURCE defined, and then we also no longer need your patch
> > >> >> to udp.c.
> > >> >
> > >> > Hmm, I'm not all that confident with how to write that within the
> > >> > configure framework. I'll see if I can get it together.
> > >> >
> > >> > Wouldn't you achieve the same thing with unconditionally adding
> > >> > _DARWIN_C_SOURCE to the list of defines if we're on darwin? It's added as
> > >> > a global define for the whole build in either case.
> > >> 
> > >> That would work as well, I guess. I'll support whichever you and our
> > >> configure gurus prefer.
> > >
> > > Yeah. Unfortunately, our main configure guru, whose opinion I had wanted 
> > > in this case, is absent...
> > 
> > check_type ... -D_DARWIN_C_SOURCE
> 
> Oh, neat, thanks!
> 
> The attached patch makes configure find this struct on OS X, and still 
> confining the define to the actual source files that need it.

Applied this.

// Martin



More information about the ffmpeg-devel mailing list