summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-08 11:03:47 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-08 11:03:47 +0000
commita4e94ada6d6beda725bcaaf4a10382402cd3ef55 (patch)
treed0fe7fcb46d1061241d9f0734754971cd252bdb0 /libc
parent570840fea5f036f5b425edc7a2e8834c8948cb67 (diff)
fix building on 64bit hosts
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/common/fstat.c6
-rw-r--r--libc/sysdeps/linux/common/stat.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/fstat.c b/libc/sysdeps/linux/common/fstat.c
index 979a0db1d..e8bed683e 100644
--- a/libc/sysdeps/linux/common/fstat.c
+++ b/libc/sysdeps/linux/common/fstat.c
@@ -7,6 +7,10 @@
* GNU Library General Public License (LGPL) version 2 or later.
*/
+/* need to hide the 64bit prototype or the weak_alias()
+ * will fail when __NR_fstat64 doesnt exist */
+#define __fstat64 __hide__fstat64
+
#include "syscalls.h"
#include <unistd.h>
#define _SYS_STAT_H
@@ -14,6 +18,8 @@
#include <bits/kernel_stat.h>
#include "xstatconv.h"
+#undef __fstat64
+
#define __NR___syscall_fstat __NR_fstat
#undef __fstat
#undef fstat
diff --git a/libc/sysdeps/linux/common/stat.c b/libc/sysdeps/linux/common/stat.c
index 7e7fe6bec..74d6e2f5f 100644
--- a/libc/sysdeps/linux/common/stat.c
+++ b/libc/sysdeps/linux/common/stat.c
@@ -7,12 +7,18 @@
* GNU Library General Public License (LGPL) version 2 or later.
*/
+/* need to hide the 64bit prototype or the weak_alias()
+ * will fail when __NR_stat64 doesnt exist */
+#define __stat64 __hide__stat64
+
#include "syscalls.h"
#include <unistd.h>
#define _SYS_STAT_H
#include <bits/stat.h>
#include "xstatconv.h"
+#undef __stat64
+
#define __NR___syscall_stat __NR_stat
#undef __stat
#undef stat