From f5ae2cd969ea4ab88109ece123c1c1f62624e8a2 Mon Sep 17 00:00:00 2001 From: arch3y Date: Fri, 15 Apr 2016 20:50:22 -0400 Subject: 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 Signed-off-by: Tobias Klauser --- ioops.c | 4 +++- proc.c | 4 +++- xmalloc.c | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ioops.c b/ioops.c index e2b9136..c1eeddc 100644 --- a/ioops.c +++ b/ioops.c @@ -1,4 +1,6 @@ -#define _GNU_SOURCE +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif #include #include #include diff --git a/proc.c b/proc.c index b0c577c..76e3c93 100644 --- a/proc.c +++ b/proc.c @@ -1,4 +1,6 @@ -#define _GNU_SOURCE +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif #include #include #include diff --git a/xmalloc.c b/xmalloc.c index 75319ff..368e18d 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -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 #include #include -- cgit v1.2.3-54-g00ecf