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 <kzak@redhat.com>
# include <sys/vfs.h>
#endif
-#ifdef HAVE_SYS_MOUNT_H
+#if defined(HAVE_SYS_MOUNT_H) && !defined(MS_RDONLY)
# include <sys/mount.h>
#endif