From c60a90b73971706f525fc7e3289291636f50caa5 Mon Sep 17 00:00:00 2001 From: Giulio Benetti Date: Thu, 6 Apr 2023 13:37:57 +0200 Subject: Fix MS_LAZYTIME not defined on uclibc and move all MS_* and UMOUNT_* (#753) as well as inclusion to new fuse_mount_compat.h file. Signed-off-by: Giulio Benetti --- include/fuse_mount_compat.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 include/fuse_mount_compat.h (limited to 'include') diff --git a/include/fuse_mount_compat.h b/include/fuse_mount_compat.h new file mode 100644 index 0000000..0142b51 --- /dev/null +++ b/include/fuse_mount_compat.h @@ -0,0 +1,42 @@ +/* + FUSE: Filesystem in Userspace + Copyright (C) 2023 Giulio Benetti + + Logging API. + + This program can be distributed under the terms of the GNU LGPLv2. + See the file LICENSE +*/ + +#ifndef FUSE_MOUNT_COMPAT_H_ +#define FUSE_MOUNT_COMPAT_H_ + +#include + +/* Some libc don't define MS_*, so define them manually + * (values taken from https://elixir.bootlin.com/linux/v4.0.9/source/include/uapi/linux/fs.h#L68 on) + */ +#ifndef MS_DIRSYNC +#define MS_DIRSYNC 128 +#endif +#ifndef MS_REC +#define MS_REC 16384 +#endif +#ifndef MS_PRIVATE +#define MS_PRIVATE (1<<18) +#endif +#ifndef MS_LAZYTIME +#define MS_LAZYTIME (1<<25) +#endif + +#ifndef UMOUNT_DETACH +#define UMOUNT_DETACH 0x00000002 /* Just detach from the tree */ +#endif +#ifndef UMOUNT_NOFOLLOW +#define UMOUNT_NOFOLLOW 0x00000008 /* Don't follow symlink on umount */ +#endif +#ifndef UMOUNT_UNUSED +#define UMOUNT_UNUSED 0x80000000 /* Flag guaranteed to be unused */ +#endif + +#endif /* FUSE_MOUNT_COMPAT_H_ */ -- cgit v1.2.3