From: Markos Chandras <markos.chand...@imgtec.com>

Signed-off-by: Markos Chandras <markos.chand...@imgtec.com>
---
 libc/sysdeps/linux/common/lseek.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libc/sysdeps/linux/common/lseek.c 
b/libc/sysdeps/linux/common/lseek.c
index 3032a27..01da89b 100644
--- a/libc/sysdeps/linux/common/lseek.c
+++ b/libc/sysdeps/linux/common/lseek.c
@@ -14,6 +14,13 @@
 #ifdef __NR_lseek
 # define __NR___lseek_nocancel __NR_lseek
 _syscall3(off_t, __NC(lseek), int, fd, off_t, offset, int, whence)
+/* Use lseek64 if __NR_lseek is not defined but UCLIBC_HAS_LFS is enabled */
+#elif !defined(__NR_lseek) && defined(__NR_llseek) \
+       && __WORDSIZE == 32 && __UCLIBC_HAS_LFS__
+off_t __NC(lseek)(int fd, off_t offset, int whence)
+{
+       return lseek64(fd, offset, whence);
+}
 #else
 # include <errno.h>
 off_t __NC(lseek)(int fd, off_t offset attribute_unused, int whence)
-- 
1.8.1.1


_______________________________________________
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to