This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/sysdeps/unix/sysv/linux/alpha/kernel-features.h
index 9c640f9..5217ca8 100644
--- a/sysdeps/unix/sysv/linux/alpha/kernel-features.h
+++ b/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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]