From: Thomas Weißschuh Date: Thu, 26 Feb 2026 16:52:44 +0000 (+0100) Subject: meson: define _GNU_SOURCE when testing for 'struct statx' X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f3644e5f1b08ba5374f8f50210ba3363c45e166;p=thirdparty%2Futil-linux.git meson: define _GNU_SOURCE when testing for 'struct statx' 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 Signed-off-by: Thomas Weißschuh --- diff --git a/meson.build b/meson.build index e9267a35f..ed6cfdc7f 100644 --- a/meson.build +++ b/meson.build @@ -107,7 +107,7 @@ have_mountfd_api = cc.has_type('struct mount_attr', prefix : '#include ') +have_struct_statx = cc.has_type('struct statx', args : '-D_GNU_SOURCE', prefix : '#include ') conf.set('HAVE_STRUCT_STATX', have_struct_statx ? 1 : false) have = cc.has_member('struct statx', 'stx_mnt_id', prefix : '#include ')