From a09477f2fe068ef124427a4266b592b5658a6597 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Wed, 30 Jan 2019 15:26:02 -0500 Subject: [PATCH] Move _XOPEN_SOURCE #define to include/c/portable.h Since it now contains a glibc feature macro, it needs to be included ahead of normal glibc headers, so vere/unix.c now starts with #include "all.h". --- include/c/portable.h | 3 +++ vere/unix.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/c/portable.h b/include/c/portable.h index 5326ce95ad..2ab7909fc8 100644 --- a/include/c/portable.h +++ b/include/c/portable.h @@ -20,6 +20,9 @@ *** C file. **/ # if defined(U3_OS_linux) +# ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE 700 +# endif # include # include # include diff --git a/vere/unix.c b/vere/unix.c index 68b40e68b9..10d80ccad4 100644 --- a/vere/unix.c +++ b/vere/unix.c @@ -1,7 +1,7 @@ /* vere/unix.c ** */ -#define _XOPEN_SOURCE 700 +#include "all.h" #include #include #include @@ -13,7 +13,6 @@ #include #include -#include "all.h" #include "vere/vere.h" /* _unix_down(): descend path.