Add symbols from sys/mount.h for older glibc.
PATCH 1/1 Add symbols from sys/mount.h for older glibc.
From: Vinson Lee <[email protected]>
MNT_DETACH and MNT_EXPIRE are not available with glibc before 2.10.
UMOUNT_NOFOLLOW is not available with glibc before 2.12.
This patches fixes these build errors with older glibc.
syscalls/umount.c:16: error: ‘MNT_DETACH’ undeclared here (not in a function) syscalls/umount.c:16: error: ‘MNT_EXPIRE’ undeclared here (not in a function) syscalls/umount.c:16: error: ‘UMOUNT_NOFOLLOW’ undeclared here (not in a function)
Signed-off-by Vinson Lee <[email protected]>
--- include/compat.h | 13 +++++++++++++ syscalls/umount.c | 1 + 2 files changed, 14 insertions(+), 0 deletions(-)
include/compat.h +13 -0
@@ -761,4 +761,17 @@ struct kvm_get_htab_fd {#define MRT_DEL_MFC_PROXY (MRT_BASE+11)#endif +/* sys/mount.h */ +#ifndef MNT_DETACH +#define MNT_DETACH 2 +#endif + +#ifndef MNT_EXPIRE +#define MNT_EXPIRE 4 +#endif + +#ifndef UMOUNT_NOFOLLOW +#define UMOUNT_NOFOLLOW 8 +#endif +#endif /* _TRINITY_COMPAT_H */
syscalls/umount.c +1 -0
@@ -3,6 +3,7 @@*/ #include <sys/mount.h> #include "sanitise.h" +#include "compat.h" struct syscall syscall_umount = { .name ="umount" ,
Signature · 1 line
1.7.4.1