summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2011-03-22 15:35:38 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2011-03-22 15:36:33 +0100
commit0faf01c27a606bbbe928a217d9926fb4fc9754c2 (patch)
treeb81bdc1a09cb8831ae46c33381e61a48cdac2da7 /patches
parenta6fe25ea2ed0cbbf8504cca4036bb5d24fe07ede (diff)
downloadptxdist-0faf01c27a606bbbe928a217d9926fb4fc9754c2.tar.gz
ptxdist-0faf01c27a606bbbe928a217d9926fb4fc9754c2.tar.xz
util-linux: add upstream patch to fix undeclared MNT_DETACH
context_umount.c: In function 'do_umount': context_umount.c:430: error: 'MNT_DETACH' undeclared (first use in this function) context_umount.c:430: error: (Each undeclared identifier is reported only once context_umount.c:430: error: for each function it appears in.) Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches')
-rw-r--r--patches/util-linux-2.19/0001-libmount-add-fallbacks-for-old-systems-without-umoun.patch53
-rw-r--r--patches/util-linux-2.19/series1
2 files changed, 54 insertions, 0 deletions
diff --git a/patches/util-linux-2.19/0001-libmount-add-fallbacks-for-old-systems-without-umoun.patch b/patches/util-linux-2.19/0001-libmount-add-fallbacks-for-old-systems-without-umoun.patch
new file mode 100644
index 000000000..c7299f3fe
--- /dev/null
+++ b/patches/util-linux-2.19/0001-libmount-add-fallbacks-for-old-systems-without-umoun.patch
@@ -0,0 +1,53 @@
+From db9bd703a9a696bd73cb7d41e98c66854a604477 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Fri, 11 Feb 2011 10:45:09 +0100
+Subject: [PATCH] libmount: add fallbacks for old systems without umount2() syscall
+
+Reported-by: Peter Breitenlohner <peb@mppmu.mpg.de>
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ shlibs/mount/src/context_umount.c | 28 ++++++++++++++++++++++++++++
+ 1 files changed, 28 insertions(+), 0 deletions(-)
+
+diff --git a/shlibs/mount/src/context_umount.c b/shlibs/mount/src/context_umount.c
+index bd9be69..1187a87 100644
+--- a/shlibs/mount/src/context_umount.c
++++ b/shlibs/mount/src/context_umount.c
+@@ -21,6 +21,34 @@
+ #include "strutils.h"
+ #include "mountP.h"
+
++#if defined(MNT_FORCE)
++/* Interesting ... it seems libc knows about MNT_FORCE and presumably
++ about umount2 as well -- need not do anything */
++#else /* MNT_FORCE */
++/* Does the present kernel source know about umount2? */
++# include <linux/unistd.h>
++# ifdef __NR_umount2
++static int umount2(const char *path, int flags);
++_syscall2(int, umount2, const char *, path, int, flags);
++# else /* __NR_umount2 */
++static int
++umount2(const char *path, int flags) {
++ fprintf(stderr, _("umount: compiled without support for -f\n"));
++ errno = ENOSYS;
++ return -1;
++}
++#endif /* __NR_umount2 */
++# if !defined(MNT_FORCE)
++# define MNT_FORCE 1
++#endif
++
++#endif /* MNT_FORCE */
++
++#if !defined(MNT_DETACH)
++#define MNT_DETACH 2
++#endif
++
++
+ static int lookup_umount_fs(struct libmnt_context *cxt)
+ {
+ int rc;
+--
+1.7.2.3
+
diff --git a/patches/util-linux-2.19/series b/patches/util-linux-2.19/series
new file mode 100644
index 000000000..7a6959d5e
--- /dev/null
+++ b/patches/util-linux-2.19/series
@@ -0,0 +1 @@
+0001-libmount-add-fallbacks-for-old-systems-without-umoun.patch