public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] alpha: do not assume statfs64 support
@ 2011-04-03 21:03 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2011-04-03 21:03 UTC (permalink / raw)
  To: libc-ports

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

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

only message in thread, other threads:[~2011-04-03 21:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-03 21:03 [PATCH] alpha: do not assume statfs64 support Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).