[PATCH 2/4] altstack: Include config.h in run.c

David Gibson <[email protected]> Tue, 16 Feb 2016 17:09:23 +1100
Newsgroups org.ozlabs.lists.ccan
Message-ID <[email protected]>
ccan programs should always include config.h before anything else to make
sure everything is set up correctly.  Doing so in altstack's run.c means
it no longer needs an explicit _XOPEN_SOURCE 700, since _GNU_SOURCE is set
in config.h (for GNU libc, anyway).

Signed-off-by: David Gibson <[email protected]>
---
 ccan/altstack/test/run.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ccan/altstack/test/run.c b/ccan/altstack/test/run.c
index de94887..389ecb9 100644
--- a/ccan/altstack/test/run.c
+++ b/ccan/altstack/test/run.c
@@ -1,3 +1,4 @@
+#include "config.h"
 #include <assert.h>
 #include <err.h>
 #include <errno.h>
@@ -8,7 +9,6 @@
 #include <sys/mman.h>
 #include <ccan/tap/tap.h>
 #include <ccan/altstack/altstack.h>
-#define _XOPEN_SOURCE 700
 #include <stdio.h>
 
 enum {
-- 
2.5.0

_______________________________________________
ccan mailing list
[email protected]
https://lists.ozlabs.org/listinfo/ccan