r4793 - in glibc-package/trunk/debian: . patches patches/alpha
Author: aurel32
Date: 2011-07-04 20:00:46 +0000 (Mon, 04 Jul 2011)
New Revision: 4793
Added:
glibc-package/trunk/debian/patches/alpha/submitted-statfs64.patch
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/series
Log:
* Add patches/alpha/submitted-statfs64.patch to fix statvfs() on alpha.
Closes: #324051.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2011-07-04 19:43:30 UTC (rev 4792)
+++ glibc-package/trunk/debian/changelog 2011-07-04 20:00:46 UTC (rev 4793)
@@ -2,6 +2,8 @@
* control.in/main: tag libc-bin Essential: yes.
* Revert patch to make libc6-dev multiarch. Closes: #632667.
+ * Add patches/alpha/submitted-statfs64.patch to fix statvfs() on alpha.
+ Closes: #324051.
-- Aurelien Jarno <aurel32@debian.org> Mon, 04 Jul 2011 07:15:43 +0200
Added: glibc-package/trunk/debian/patches/alpha/submitted-statfs64.patch
===================================================================
--- glibc-package/trunk/debian/patches/alpha/submitted-statfs64.patch (rev 0)
+++ glibc-package/trunk/debian/patches/alpha/submitted-statfs64.patch 2011-07-04 20:00:46 UTC (rev 4793)
@@ -0,0 +1,43 @@
+>From cd96467fcfa0b2a9be52dfc4e013d8051a827edc Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 3 Apr 2011 16:54:50 -0400
+Subject: [PATCH] alpha: do not assume statfs64 support
+
+In the past, the alpha port used the wordsize-64/statfs64.c stub which
+allowed the statfs64() func to alias to statfs(). But after the move
+to the ports tree, some shuffling happened and now alpha's statfs64.c
+will pull in the standard 32bit linux statfs64.c file. The problem
+with this is that the code expands into a stub function if the 64bit
+syscall is not defined and __ASSUME_STATFS64 is defined (which is
+currently the case for alpha).
+
+Since the alpha port has never had a statfs64 func, but has always had
+only a 32bit struct version with the kernel ABI, it is wrong to alias
+statfs64 to statfs. So rather than restore the stub statfs64.c file,
+undef __ASSUME_STATFS64 in the alpha kernel-features.h. This way the
+common code will do the right thing -- use the 32bit statfs syscall
+and translate the result in userspace from the 32bit struct to the
+64bit struct.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ sysdeps/unix/sysv/linux/alpha/kernel-features.h | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
+index 9c640f9..5217ca8 100644
+--- a/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
++++ b/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
+@@ -70,6 +70,9 @@
+
+ #undef __ASSUME_ST_INO_64_BIT
+
++/* Alpha does not have a 64bit syscall, and its native syscall is 32bits. */
++#undef __ASSUME_STATFS64
++
+ /* pselect/ppoll were introduced on alpha just after 2.6.22-rc1. */
+ #if __LINUX_KERNEL_VERSION < 0x020617
+ # undef __ASSUME_PSELECT
+--
+1.7.4.1
+
Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series 2011-07-04 19:43:30 UTC (rev 4792)
+++ glibc-package/trunk/debian/patches/series 2011-07-04 20:00:46 UTC (rev 4793)
@@ -60,6 +60,7 @@
alpha/submitted-PTR_MANGLE.diff
alpha/local-strncmp.diff
alpha/submitted-sysconf-cache.diff
+alpha/submitted-statfs64.patch
amd64/local-biarch.diff
amd64/local-clone.diff
Reply to: