From de20a8ffc5cf89134f035193ce1cdc2d76c88ee0 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 15 Apr 2014 18:16:37 -0400 Subject: add namespace-protected name for sysinfo function it will be needed to implement some things in sysconf, and the syscall can't easily be used directly because the x32 syscall uses the wrong structure layout. the l (uncreative, for "linux") prefix is used since the symbol name __sysinfo is already taken for AT_SYSINFO from the aux vector. the way the x32 override of this function works is also changed to be simpler and avoid the useless jump instruction. --- src/linux/sysinfo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/linux/sysinfo.c') diff --git a/src/linux/sysinfo.c b/src/linux/sysinfo.c index 7e64f330..4b5a798d 100644 --- a/src/linux/sysinfo.c +++ b/src/linux/sysinfo.c @@ -1,7 +1,10 @@ #include #include "syscall.h" +#include "libc.h" -int sysinfo(struct sysinfo *info) +int __lsysinfo(struct sysinfo *info) { return syscall(SYS_sysinfo, info); } + +weak_alias(__lsysinfo, sysinfo); -- cgit v1.2.1