From 5f66e252c1c2dd0e7a8a5f429cdfa4798cfa3d85 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 7 Apr 2026 15:34:13 +0200 Subject: [PATCH] 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 --- include/statfs_magic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.3