From 1af964d935012707205fa66c3b404573271d9d06 Mon Sep 17 00:00:00 2001 From: Morgan Jones Date: Sun, 5 Apr 2026 18:03:54 -0700 Subject: [PATCH] include/statfs_magic.h: add portable struct statfs headers for Darwin Fixes the build on Darwin since struct statfs is in sys/mount.h and sys/vfs.h doesn't even exist. Just conditionally include all the headers. [kzak@redhat.com: - removed lib/pidfd-utils.c change] Signed-off-by: Karel Zak --- include/statfs_magic.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/statfs_magic.h b/include/statfs_magic.h index 6921abaa4..28977f392 100644 --- a/include/statfs_magic.h +++ b/include/statfs_magic.h @@ -5,10 +5,26 @@ #ifndef UTIL_LINUX_STATFS_MAGIC_H #define UTIL_LINUX_STATFS_MAGIC_H +#ifdef HAVE_SYS_TYPES_H +# include +#endif + +#ifdef HAVE_SYS_STAT_H +# include +#endif + #ifdef HAVE_SYS_STATFS_H # include #endif +#ifdef HAVE_SYS_VFS_H +# include +#endif + +#ifdef HAVE_SYS_MOUNT_H +# include +#endif + /* * If possible then don't depend on internal libc __SWORD_TYPE type. */ -- 2.47.3