diff --git a/arch/x32/src/sysinfo.c b/arch/x32/src/sysinfo.c index 0f11cf3ca1f7c7a4e0183076b106bb7b6c9070fc..d1c1b1489205c81554b5c9f30a0724a56e818c04 100644 --- a/arch/x32/src/sysinfo.c +++ b/arch/x32/src/sysinfo.c @@ -1,5 +1,6 @@ #include #include "syscall.h" +#include "libc.h" #define klong long long #define kulong unsigned long long @@ -20,7 +21,7 @@ struct kernel_sysinfo { unsigned mem_unit; }; -int __x32_sysinfo(struct sysinfo *info) +int __lsysinfo(struct sysinfo *info) { struct kernel_sysinfo tmp; int ret = syscall(SYS_sysinfo, &tmp); @@ -45,3 +46,5 @@ int __x32_sysinfo(struct sysinfo *info) info->mem_unit = (tmp.mem_unit ? tmp.mem_unit : 1) << shifts; return ret; } + +weak_alias(__lsysinfo, sysinfo); diff --git a/src/linux/sysinfo.c b/src/linux/sysinfo.c index 7e64f330a184e451457cd4475ece471c790e7669..4b5a798d0683e1410a08b6efcf5e2d6505ea0900 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); diff --git a/src/linux/x32/sysinfo.s b/src/linux/x32/sysinfo.s index 43c378c1d5429bcb3b08c2a33ccd8dae4d73eb9e..53d79db27de2a810d0cf525e1a4e8a82020d9984 100644 --- a/src/linux/x32/sysinfo.s +++ b/src/linux/x32/sysinfo.s @@ -1,5 +1 @@ -.text -.global sysinfo -.type sysinfo,@function -sysinfo: - jmp __x32_sysinfo +# see arch/x32/src/sysinfo.c