From: Karel Zak Date: Tue, 7 Apr 2026 13:34:13 +0000 (+0200) Subject: include/statfs_magic.h: avoid sys/mount.h and linux/fs.h collision X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f66e252c1c2;p=thirdparty%2Futil-linux.git include/statfs_magic.h: avoid sys/mount.h and linux/fs.h collision Guard the sys/mount.h include with !defined(MS_RDONLY) to prevent redefinition errors when linux/fs.h has already been included (e.g., in fstrim.c). This follows the same pattern used in libmount.h.in. Fixes: 1af964d935 ("include/statfs_magic.h: add portable struct statfs headers for Darwin") Signed-off-by: Karel Zak --- diff --git a/include/statfs_magic.h b/include/statfs_magic.h index 28977f392..a73bdb926 100644 --- a/include/statfs_magic.h +++ b/include/statfs_magic.h @@ -21,7 +21,7 @@ # include #endif -#ifdef HAVE_SYS_MOUNT_H +#if defined(HAVE_SYS_MOUNT_H) && !defined(MS_RDONLY) # include #endif