glibc (at least with 2.43) requires _GNU_SOURCE to be defined to expose
'struct statx' from 'sys/stat.h'.
Define _GNU_SOURCE in the feature test, so 'struct statx' is correctly
detected. The code is being build with _GNU_SOURCE anyways.
With autotools this happens automatically.
Reported-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
conf.set('HAVE_STRUCT_MOUNT_ATTR', have_mountfd_api ? 1 : false)
conf.set('HAVE_MOUNTFD_API', have_mountfd_api ? 1 : false)
-have_struct_statx = cc.has_type('struct statx', prefix : '#include <sys/stat.h>')
+have_struct_statx = cc.has_type('struct statx', args : '-D_GNU_SOURCE', prefix : '#include <sys/stat.h>')
conf.set('HAVE_STRUCT_STATX', have_struct_statx ? 1 : false)
have = cc.has_member('struct statx', 'stx_mnt_id',
prefix : '#include <linux/stat.h>')