From 1b0cdc3e669b69281371ab77893792d2d8621af9 Mon Sep 17 00:00:00 2001 From: Evan Hunter Date: Sat, 8 Oct 2016 11:27:03 +0100 Subject: [PATCH] Avoid re-defining _GNU_SOURCE pkgconfig for SDL causes _GNU_SOURCE to be defined on the commandline, hence causing an error when these source files re-define it. --- jim-aio.c | 2 ++ jim-exec.c | 2 ++ jim.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/jim-aio.c b/jim-aio.c index 93e0b41..0631e40 100644 --- a/jim-aio.c +++ b/jim-aio.c @@ -39,7 +39,9 @@ #include "jimautoconf.h" +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include #include #include diff --git a/jim-exec.c b/jim-exec.c index 19b5128..6690c75 100644 --- a/jim-exec.c +++ b/jim-exec.c @@ -20,7 +20,9 @@ * express or implied warranty. */ +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include #include diff --git a/jim.c b/jim.c index 3c52f74..bf98eb9 100644 --- a/jim.c +++ b/jim.c @@ -41,7 +41,9 @@ * official policies, either expressed or implied, of the Jim Tcl Project. **/ #define JIM_OPTIMIZATION /* comment to avoid optimizations and reduce size */ +#ifndef _GNU_SOURCE #define _GNU_SOURCE /* Mostly just for environ */ +#endif #include #include -- 2.11.4.GIT