From: Morgan Jones Date: Mon, 6 Apr 2026 01:03:54 +0000 (-0700) Subject: include/statfs_magic.h: add portable struct statfs headers for Darwin X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1af964d935;p=thirdparty%2Futil-linux.git 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 --- 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. */