[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Vinson Lee <vlee@xxxxxxxxxxx>

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 <vlee@xxxxxxxxxxx>
---
 include/compat.h  |   13 +++++++++++++
 syscalls/umount.c |    1 +
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/include/compat.h b/include/compat.h
index ae57fcb..bb77e3b 100644
--- a/include/compat.h
+++ b/include/compat.h
@@ -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 */
diff --git a/syscalls/umount.c b/syscalls/umount.c
index 3523df2..fce22ff 100644
--- a/syscalls/umount.c
+++ b/syscalls/umount.c
@@ -3,6 +3,7 @@
  */
 #include <sys/mount.h>
 #include "sanitise.h"
+#include "compat.h"
 
 struct syscall syscall_umount = {
 	.name = "umount",
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux