summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-12-23 22:50:44 +0100
committerClément Bœsch <ubitux@gmail.com>2012-12-24 00:54:06 +0100
commit98dc25672fb7116d5885a4133f07b66cec99f187 (patch)
treeb97be7ab4f6a6a84f4331ced4a982ddab322c10a /libavcodec
parent00ebac6dfdcba0966d5722d80707236965a6a977 (diff)
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] <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
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/pthread.c4
1 files changed, 3 insertions, 1 deletions
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 <sched.h>
#endif
#if HAVE_GETPROCESSAFFINITYMASK