From 98dc25672fb7116d5885a4133f07b66cec99f187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Sun, 23 Dec 2012 22:50:44 +0100 Subject: [PATCH] lavc/pthread: do not re-define _GNU_SOURCE if already defined. This fixes the following warning with GCC: libavcodec/pthread.c:35:0: warning: _GNU_SOURCE redefined [enabled by default] ::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 --- libavcodec/pthread.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index ed6f0e1171..b55cccf200 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -32,7 +32,9 @@ #include "config.h" #if HAVE_SCHED_GETAFFINITY -#define _GNU_SOURCE +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif #include #endif #if HAVE_GETPROCESSAFFINITYMASK