--- ./configure.ac_orig 2026-10-30 01:03:24.675384256 -0500 +++ ./configure.ac 2026-10-30 01:04:23.385384287 -0500 @@ -564,9 +564,13 @@ AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec],,, [[#include ]]) -AC_CHECK_TYPES([struct statx], [have_struct_statx=yes], [have_struct_statx=no], [[#include ]]) -AC_CHECK_MEMBERS([struct statx.stx_mnt_id],,, - [[#include ]]) +AS_IF([test "x$linux_os" = xyes], [ + AC_CHECK_TYPES([struct statx], [have_struct_statx=yes], [have_struct_statx=no], [[#include ]]) + AC_CHECK_MEMBERS([struct statx.stx_mnt_id],,, + [[#include ]]) +], [ + have_struct_statx=no +]) AC_CHECK_DECLS([_NL_TIME_WEEK_1STDAY],[],[],[[#include ]]) @@ -699,7 +703,11 @@ AC_CHECK_FUNCS([posix_fallocate], [have_posix_fallocate=yes], [have_posix_fallocate=no]) AC_CHECK_FUNCS([reboot], [have_reboot=yes],[have_reboot=no]) AC_CHECK_FUNCS([updwtmpx updwtmpx], [have_gnu_utmpx=yes], [have_gnu_utmpx=no]) -AC_CHECK_FUNCS([statx], [have_statx=yes], [have_statx=no]) +AS_IF([test "x$linux_os" = xyes], [ + AC_CHECK_FUNCS([statx], [have_statx=yes], [have_statx=no]) +], [ + have_statx=no +]) AM_CONDITIONAL([HAVE_OPENAT], [test "x$have_openat" = xyes]) AM_CONDITIONAL([HAVE_LINUX_LANDLOCK_H], [test "x$ac_cv_header_linux_landlock_h" = xyes]) --- ./disk-utils/mkfs.minix.c_orig 2026-10-30 01:04:49.030759975 -0500 +++ ./disk-utils/mkfs.minix.c 2026-10-30 01:05:34.866309046 -0500 @@ -70,8 +70,8 @@ #include #include #include -#include +#include "c.h" #include "blkdev.h" #include "minix_programs.h" #include "nls.h" --- ./lib/configs.c_orig 2026-10-30 01:05:44.560018709 -0500 +++ ./lib/configs.c 2026-10-30 01:05:49.101923494 -0500 @@ -1,7 +1,6 @@ /* * configs_file.c instantiates functions defined and described in configs_file.h */ -#include #include #include #include --- ./lib/fileeq.c_orig 2026-10-30 01:05:58.496106858 -0500 +++ ./lib/fileeq.c 2026-10-30 01:06:38.839159312 -0500 @@ -570,7 +570,6 @@ #ifdef TEST_PROGRAM_FILEEQ # include -# include int main(int argc, char *argv[]) { --- ./lib/fileutils.c_orig 2026-10-30 01:07:49.125383549 -0500 +++ ./lib/fileutils.c 2026-10-30 01:08:08.270107591 -0500 @@ -11,7 +11,9 @@ #include #include #include -#include +#ifdef HAVE_SYS_SYSCALL_H +# include +#endif #include #include #include --- ./lib/pager.c_orig 2026-10-30 01:08:31.860039938 -0500 +++ ./lib/pager.c 2026-10-30 01:08:38.176411228 -0500 @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include --- ./lib/pidfd-utils.c_orig 2026-10-30 01:09:10.787355365 -0500 +++ ./lib/pidfd-utils.c 2026-10-30 01:09:16.662728988 -0500 @@ -9,7 +9,6 @@ #include #include #include -#include #include "c.h" #include "nls.h" --- ./lib/sysfs.c_orig 2026-10-30 01:09:45.644553937 -0500 +++ ./lib/sysfs.c 2026-10-30 01:09:59.810069205 -0500 @@ -1203,7 +1203,6 @@ #ifdef TEST_PROGRAM_SYSFS #include -#include #include int main(int argc, char *argv[]) --- ./login-utils/lslogins.c_orig 2026-10-30 01:10:30.964669184 -0500 +++ ./login-utils/lslogins.c 2026-10-30 01:10:38.483588574 -0500 @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include --- ./login-utils/su-common.c_orig 2026-10-30 01:11:15.729410953 -0500 +++ ./login-utils/su-common.c 2026-10-30 01:11:30.863760302 -0500 @@ -51,8 +51,6 @@ # define USE_PTY #endif -#include "err.h" - #include #include "c.h" --- ./meson.build_orig 2026-10-30 01:11:50.440648591 -0500 +++ ./meson.build 2026-10-30 01:15:40.723665793 -0500 @@ -264,11 +264,17 @@ 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', args : '-D_GNU_SOURCE', prefix : '#include ') +have_struct_statx = false +have_statx_mnt_id = false +if host_machine.system() == 'linux' + have_struct_statx = cc.has_type('struct statx', args : '-D_GNU_SOURCE', prefix : '#include ') + if have_struct_statx + have_statx_mnt_id = cc.has_member('struct statx', 'stx_mnt_id', + prefix : '#include ') + endif +endif conf.set('HAVE_STRUCT_STATX', have_struct_statx ? 1 : false) -have = cc.has_member('struct statx', 'stx_mnt_id', - prefix : '#include ') -conf.set('HAVE_STRUCT_STATX_STX_MNT_ID', have ? 1 : false) +conf.set('HAVE_STRUCT_STATX_STX_MNT_ID', have_statx_mnt_id ? 1 : false) have_statmount = cc.has_type('struct statmount', prefix : '#include ') @@ -689,7 +695,6 @@ sched_setscheduler sigqueue srandom - statx strnchr strndup strnlen @@ -729,6 +734,12 @@ conf.set('HAVE_' + func.to_upper(), have ? 1 : false) endforeach +have_statx = false +if host_machine.system() == 'linux' + have_statx = cc.has_function('statx') +endif +conf.set('HAVE_STATX', have_statx ? 1 : false) + have_mempcpy = cc.has_function('mempcpy', prefix: '#include ', args: '-D_GNU_SOURCE') conf.set('HAVE_MEMPCPY', have_mempcpy ? 1 : false) --- ./misc-utils/uuidd.c_orig 2026-10-30 01:16:41.727005368 -0500 +++ ./misc-utils/uuidd.c 2026-10-30 01:16:51.937223507 -0500 @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include --- ./sys-utils/eject.c_orig 2026-10-30 01:17:00.920960789 -0500 +++ ./sys-utils/eject.c 2026-10-30 01:17:20.926353542 -0500 @@ -24,7 +24,6 @@ #include #include #include -#include #include #include --- ./sys-utils/pivot_root.c_orig 2026-10-30 01:19:02.231090290 -0500 +++ ./sys-utils/pivot_root.c 2026-10-30 01:19:09.910307201 -0500 @@ -8,7 +8,6 @@ * * Copyright (C) 2000 Werner Almesberger */ -#include #include #include #include --- ./tests/helpers/test_enosys.c_orig 2026-10-30 01:20:27.215407111 -0500 +++ ./tests/helpers/test_enosys.c 2026-10-30 01:21:35.462577580 -0500 @@ -15,10 +15,11 @@ * along with this program. If not, see . */ -#include #include #include #include + +#include "c.h" #include #include #include --- ./tests/helpers/test_md5.c_orig 2026-10-30 01:22:36.623031747 -0500 +++ ./tests/helpers/test_md5.c 2026-10-30 01:22:50.665382716 -0500 @@ -6,8 +6,8 @@ #include #include #include -#include +#include "c.h" #include "md5.h" int main(void) --- ./tests/helpers/test_mkfds_ppoll.c_orig 2026-10-30 01:23:21.278254704 -0500 +++ ./tests/helpers/test_mkfds_ppoll.c 2026-10-30 01:25:40.575382732 -0500 @@ -38,8 +38,9 @@ #include "test_mkfds.h" +/* c.h conflicts with raw kernel headers used below */ +#include #include /* memset */ -#include /* err */ #include /* EINTR */ #include /* struct pollfd */ #include /* sigset_t */ --- ./tests/helpers/test_open_twice.c_orig 2026-10-30 01:26:15.681534315 -0500 +++ ./tests/helpers/test_open_twice.c 2026-10-30 01:26:41.456873798 -0500 @@ -27,7 +27,6 @@ * After another character is given, the program exits. */ -#include #include #include #include @@ -36,6 +35,8 @@ #include #include +#include "c.h" + static void __attribute__((__noreturn__)) usage(const char *prog, FILE *fp, int eval) { fputs("Usage :\n", fp); --- ./tests/helpers/test_sha1.c_orig 2026-10-30 01:27:15.624161702 -0500 +++ ./tests/helpers/test_sha1.c 2026-10-30 01:27:32.749384166 -0500 @@ -5,9 +5,9 @@ */ #include #include -#include #include +#include "c.h" #include "sha1.h" int main(void) --- ./tests/helpers/test_sigreceive.c_orig 2026-10-30 01:28:20.065401107 -0500 +++ ./tests/helpers/test_sigreceive.c 2026-10-30 01:28:35.275408589 -0500 @@ -6,9 +6,10 @@ * Written by Sami Kerola */ -#include #include #include + +#include "c.h" #include #include #include --- ./tests/helpers/test_sigstate.c_orig 2026-10-30 01:29:08.125599251 -0500 +++ ./tests/helpers/test_sigstate.c 2026-10-30 01:29:28.136308934 -0500 @@ -12,7 +12,6 @@ #include #include #include -#include #define _U_ __attribute__((__unused__)) --- ./text-utils/hexdump.c_orig 2026-10-30 01:30:06.826095610 -0500 +++ ./text-utils/hexdump.c 2026-10-30 01:30:19.027684144 -0500 @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include "hexdump.h"