diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index d27fcbf46b..86f0d5c39f 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -3875,7 +3875,9 @@ static const option_map_t option_map[] = { #endif /* Valid options not found in mount(8) */ { MNTOPT_BIND, MS_BIND }, +#ifdef MS_REC { MNTOPT_RBIND, MS_BIND|MS_REC }, +#endif { MNTOPT_COMMENT, MS_COMMENT }, { MNTOPT_BOOTWAIT, MS_COMMENT }, { MNTOPT_NOBOOTWAIT, MS_COMMENT }, diff --git a/lib/libspl/include/sys/mount.h b/lib/libspl/include/sys/mount.h index f6a67c6a0c..9eb893fe64 100644 --- a/lib/libspl/include/sys/mount.h +++ b/lib/libspl/include/sys/mount.h @@ -42,6 +42,15 @@ #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