From 77b774b30f9125e77137c57a2ff86de57361d947 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 23 Aug 2018 09:36:06 +0200 Subject: [PATCH] build: avoid redefining _DEFAULT_SOURCE Work around further glibc toolchain annoyances. Signed-off-by: Jo-Philipp Wich --- file.c | 5 ++++- main.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/file.c b/file.c index 2f829f1..b73fd47 100644 --- a/file.c +++ b/file.c @@ -17,7 +17,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define _DEFAULT_SOURCE +#ifndef _DEFAULT_SOURCE +# define _DEFAULT_SOURCE +#define + #define _BSD_SOURCE #define _DARWIN_C_SOURCE #define _XOPEN_SOURCE 700 diff --git a/main.c b/main.c index 6574c15..219e37e 100644 --- a/main.c +++ b/main.c @@ -17,7 +17,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define _DEFAULT_SOURCE +#ifndef _DEFAULT_SOURCE +# define _DEFAULT_SOURCE +#endif + #define _BSD_SOURCE #define _GNU_SOURCE #define _XOPEN_SOURCE 700 -- 2.25.1