Signed-off-by: Jonas Bonn <[email protected]>
---
libc/sysdeps/linux/common/fstat.c | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/libc/sysdeps/linux/common/fstat.c
b/libc/sysdeps/linux/common/fstat.c
index acc639b..f3fd48e 100644
--- a/libc/sysdeps/linux/common/fstat.c
+++ b/libc/sysdeps/linux/common/fstat.c
@@ -12,6 +12,21 @@
#include <sys/stat.h>
#include "xstatconv.h"
+#ifdef __NR_fstat64
+int fstat(int fd, struct stat *buf)
+{
+ int result;
+ struct kernel_stat64 kbuf;
+
+ result = INLINE_SYSCALL(fstat64, 2, fd, &kbuf);
+ if (result == 0) {
+ __xstat32_conv(&kbuf, buf);
+ }
+ return result;
+}
+libc_hidden_def(fstat)
+
+#elif defined __NR_fstat
#define __NR___syscall_fstat __NR_fstat
static __inline__ _syscall2(int, __syscall_fstat, int, fd, struct kernel_stat
*, buf)
@@ -26,9 +41,15 @@ int fstat(int fd, struct stat *buf)
}
return result;
}
+
libc_hidden_def(fstat)
-#if ! defined __NR_fstat64 && defined __UCLIBC_HAS_LFS__
+#if defined __UCLIBC_HAS_LFS__
strong_alias_untyped(fstat,fstat64)
libc_hidden_def(fstat64)
#endif
+
+#endif
+
+
+
--
1.7.5.4
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc