policycoreutils: seunshare: define _GNU_SOURCE earlier

If one tries to build policycoreutils it won't work because of:

seunshare.c: In function ‘main’:
seunshare.c:242:21: error: ‘CLONE_NEWNS’ undeclared (first use in this
function)
seunshare.c:242:21: note: each undeclared identifier is reported only
once for each function it appears in
make[1]: *** [seunshare.o] Error 1

Moving the #define _GNU_SOURCE earlier in the file means it is set when
sched.h is includes via some of dependancy chain.  Thus it can build.

Signed-off-by: Eric Paris <eparis@redhat.com>
This commit is contained in:
Eric Paris 2011-08-02 13:58:07 -04:00
parent 30ad11feb9
commit 39066bd0ac
1 changed files with 1 additions and 1 deletions

View File

@ -1,10 +1,10 @@
#define _GNU_SOURCE
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <syslog.h>
#include <sys/mount.h>
#include <pwd.h>
#define _GNU_SOURCE
#include <sched.h>
#include <string.h>
#include <stdio.h>