X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=lib%2Flibspl%2Finclude%2Fsys%2Fmount.h;h=d4ac6a9585d680979fc030b117dfe1671afdf055;hb=8a7e1ceefa430988c8f888ca708ab307333b4464;hp=f6a67c6a0caf2c106d8118e0cdb7b1bbf09ea983;hpb=3fb1fcdea167d705e050a0383ec61b95fbe8a0ed;p=zfs.git diff --git a/lib/libspl/include/sys/mount.h b/lib/libspl/include/sys/mount.h index f6a67c6..d4ac6a9 100644 --- a/lib/libspl/include/sys/mount.h +++ b/lib/libspl/include/sys/mount.h @@ -42,11 +42,35 @@ #define BLKGETSIZE64 _IOR(0x12, 114, size_t) #endif +/* + * Some old glibc headers don't correctly define MS_DIRSYNC and + * instead use the enum name S_WRITE. When using these older + * headers define MS_DIRSYNC to be S_WRITE. + */ +#if !defined(MS_DIRSYNC) +#define MS_DIRSYNC S_WRITE +#endif + #define MS_USERS 0x40000000 #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 */ #endif /* _LIBSPL_SYS_MOUNT_H */