Skip to content

Commit

Permalink
lavc/pthread: do not re-define _GNU_SOURCE if already defined.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ubitux committed Dec 23, 2012
1 parent 00ebac6 commit 98dc256
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libavcodec/pthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 98dc256

Please sign in to comment.