All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add symbols from sys/mount.h for older glibc.
@ 2013-08-24  2:10 Vinson Lee
  0 siblings, 0 replies; only message in thread
From: Vinson Lee @ 2013-08-24  2:10 UTC (permalink / raw)
  To: trinity; +Cc: Vinson Lee

From: Vinson Lee <vlee@twitter.com>

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@twitter.com>
---
 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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-08-24  2:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-24  2:10 [PATCH] Add symbols from sys/mount.h for older glibc Vinson Lee

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.