summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-04-07 01:09:08 +0000
committerMike Frysinger <vapier@gentoo.org>2011-04-07 01:09:08 +0000
commit597dc13388feb1cee967ec2733b88a09e9d3d951 (patch)
tree1578fc00c6103e4af20d0ba2c0bf2708f3aa44ff /sys-apps/util-linux/files
parentRe-digest the re-rolled rc2 (#2), drop all patches as they are all upstreamed... (diff)
downloadgentoo-2-597dc13388feb1cee967ec2733b88a09e9d3d951.tar.gz
gentoo-2-597dc13388feb1cee967ec2733b88a09e9d3d951.tar.bz2
gentoo-2-597dc13388feb1cee967ec2733b88a09e9d3d951.zip
Add fallback code for older versions of glibc #361271 by Viktor Robev.
(Portage version: 2.2.0_alpha28/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/util-linux/files')
-rw-r--r--sys-apps/util-linux/files/util-linux-2.19-old-libc.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/sys-apps/util-linux/files/util-linux-2.19-old-libc.patch b/sys-apps/util-linux/files/util-linux-2.19-old-libc.patch
new file mode 100644
index 000000000000..2ffff84fc61f
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.19-old-libc.patch
@@ -0,0 +1,41 @@
+http://bugs.gentoo.org/361271
+
+random upstream patches for building with older versions of glibc
+
+--- 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;