diff options
author | arch3y <arch3y@archstrike.org> | 2016-04-15 20:50:22 -0400 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2016-04-17 17:09:29 +0200 |
commit | f5ae2cd969ea4ab88109ece123c1c1f62624e8a2 (patch) | |
tree | d8c578000fd8a56754df3d8a970a2b34b1a67068 | |
parent | a0f448cecc02a6e101aa3858b2d68b9cccf11149 (diff) |
build: fix compilation warnings with _GNU_SOURCE
Fix the following warnings when building with glibc>=2.20:
proc.c:1:0: warning: "_GNU_SOURCE" redefined
ioops.c:1:0: warning: "_GNU_SOURCE" redefined
xmalloc.c:8:0: warning: "_GNU_SOURCE" redefined
Signed-off-by: Arch3y <arch3y@archstrike.org>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r-- | ioops.c | 4 | ||||
-rw-r--r-- | proc.c | 4 | ||||
-rw-r--r-- | xmalloc.c | 5 |
3 files changed, 9 insertions, 4 deletions
@@ -1,4 +1,6 @@ -#define _GNU_SOURCE +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> @@ -1,4 +1,6 @@ -#define _GNU_SOURCE +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif #include <sched.h> #include <sys/wait.h> #include <sys/types.h> @@ -4,8 +4,9 @@ * Copyright 2014, 2015 Tobias Klauser * Subject to the GPL, version 2. */ - -#define _GNU_SOURCE +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif #include <stdarg.h> #include <stdio.h> #include <stdlib.h> |