X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=lib%2Flibspl%2Finclude%2Fsys%2Fmount.h;h=145e785e3d520acf33db9b2fb9dbbbc0beb361c2;hb=756c3e5a9ce36461939a8dc421918e1c3a379fa6;hp=9eb893fe64bf6266ba8d44819106062023aa7bc0;hpb=afffb5cd102f340f3879f4d7af8988dd209b9b72;p=zfs.git diff --git a/lib/libspl/include/sys/mount.h b/lib/libspl/include/sys/mount.h index 9eb893f..145e785 100644 --- a/lib/libspl/include/sys/mount.h +++ b/lib/libspl/include/sys/mount.h @@ -55,7 +55,29 @@ #define MS_OWNER 0x10000000 #define MS_GROUP 0x08000000 #define MS_COMMENT 0x02000000 -#define MS_FORCE MNT_FORCE -#define MS_DETACH MNT_DETACH + +/* + * Older glibc headers did not define all the available + * umount2(2) flags. Both MNT_FORCE and MNT_DETACH are supported in the + * kernel back to 2.4.11 so we define them correctly if they are missing. + */ +#ifdef MNT_FORCE +# define MS_FORCE MNT_FORCE +#else +# define MS_FORCE 0x00000001 +#endif /* MNT_FORCE */ + +#ifdef MNT_DETACH +# define MS_DETACH MNT_DETACH +#else +# define MS_DETACH 0x00000002 +#endif /* MNT_DETACH */ + +/* + * Overlay mount is default in Linux, but for solaris/zfs + * compatibility, MS_OVERLAY is defined to explicitly have the user + * provide a flag (-O) to mount over a non empty directory. + */ +#define MS_OVERLAY 0x00000004 #endif /* _LIBSPL_SYS_MOUNT_H */