[FFmpeg-devel] [PATCH] lavc/pthread: do not re-define _GNU_SOURCE if already defined.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Dec 24 14:52:15 CET 2012


On Mon, Dec 24, 2012 at 08:14:01AM +0100, Clément Bœsch wrote:
> On Mon, Dec 24, 2012 at 08:03:08AM +0100, Reimar Döffinger wrote:
> > 
> > 
> > On 23 Dec 2012, at 22:51, Clément Bœsch <ubitux at gmail.com> wrote:
> > 
> > > This fixes the following warning with GCC:
> > >    libavcodec/pthread.c:35:0: warning: _GNU_SOURCE redefined [enabled by default]
> > >    <command-line>::0: note: this is the location of the previous definition
> > > 
> > > The reason of the presence of this flag is:
> > >    % pkg-config --cflags sdl
> > >    -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL
> > 
> > Nothing against the patch, but:
> > I was told SDL fixed that, it is a seriously bad idea for them to have that there.
> > If this still happens with recent SDL versions, IMHO it should be reported as a bug.
> 
> [/tmp/SDL-1.2.15]☭ grep D_GNU_SOURCE configure.in
>         BASE_CFLAGS="-D_GNU_SOURCE=1"
> 
> Doesn't look like to be fixed…

Not sure what this shows...
It's not a problem that they are using it, it's just a problem if it is
required for the headers (I believe it is not) and that it appears in
the pkg-config file.


More information about the ffmpeg-devel mailing list