summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <sven.eden@prydeworx.com>2018-10-23 20:19:07 +0200
committerSven Eden <sven.eden@prydeworx.com>2018-11-08 08:02:57 +0100
commit00b618db56b496823d74a0cc61537138ad6cb367 (patch)
tree28240b514ad27493df1e12ad4f897c10862baf59
parente3b7da9b85e2fd388ed9d0e5ee1aa7883a392b01 (diff)
Prep v240: Fix struct statx detection when _GNU_SOURCE is not in ENV
Bug: #84 Closes: #84 Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
-rw-r--r--meson.build9
1 files changed, 7 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index b205222..a0d8666 100644
--- a/meson.build
+++ b/meson.build
@@ -497,6 +497,11 @@ conf.set('SIZEOF_TIME_T', cc.sizeof('time_t', prefix : '#include <sys/time.h>'))
conf.set('SIZEOF_RLIM_T', cc.sizeof('rlim_t', prefix : '#include <sys/resource.h>'))
decl_headers = '''
+#if 1 /// elogind supports system where _GNU_SOURCE is not set in ENV
+# ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+# endif // _GNU_SOURCE
+#endif // 1
#include <uchar.h>
#include <linux/ethtool.h>
#include <linux/fib_rules.h>
@@ -577,7 +582,7 @@ foreach ident : [
#include <fcntl.h>'''],
['setns', '''#include <sched.h>'''],
['renameat2', '''#include <stdio.h>
-// #include <fcntl.h>'''],
+ #include <fcntl.h>'''],
['kcmp', '''#include <linux/kcmp.h>'''],
['keyctl', '''#include <sys/types.h>
#include <keyutils.h>'''],
@@ -587,7 +592,7 @@ foreach ident : [
#include <unistd.h>'''],
['statx', '''#include <sys/types.h>
#include <sys/stat.h>
-// #include <unistd.h>'''],
+ #include <unistd.h>'''],
['explicit_bzero' , '''#include <string.h>'''],
['reallocarray', '''#include <malloc.h>'''],
]