summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/lseek.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2016-11-27 22:31:25 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2016-11-27 22:32:11 +0100
commit74ca8d6f5d2e29bb7cf4606531313ee8c52b9eda (patch)
treeb2e5ad49c4499ca7c21a92e4d4c3e3aced7cb524 /libc/sysdeps/linux/common/lseek.c
parentd9f4c6bb0568da6d80f60a0040354f45478f84a3 (diff)
remove UCLIBC_HAS_LFS
Diffstat (limited to 'libc/sysdeps/linux/common/lseek.c')
-rw-r--r--libc/sysdeps/linux/common/lseek.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libc/sysdeps/linux/common/lseek.c b/libc/sysdeps/linux/common/lseek.c
index 11a1fbb3e..cbebbaec5 100644
--- a/libc/sysdeps/linux/common/lseek.c
+++ b/libc/sysdeps/linux/common/lseek.c
@@ -14,17 +14,16 @@
#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
#include <endian.h>
off_t __NC(lseek)(int fd, off_t offset, int whence)
{
-#if defined __UCLIBC_HAS_LFS__
- return lseek64(fd, offset, whence);
-#elif __WORDSIZE == 32
+#if __WORDSIZE == 32
__off64_t result;
__off_t high = 0;
return INLINE_SYSCALL(llseek, 5, fd, high, offset, &result, whence) ?: result;
+#else
+ return lseek64(fd, offset, whence);
#endif
/* No need to handle __WORDSIZE == 64 as such a kernel won't define __NR_llseek */
}
@@ -53,7 +52,7 @@ off_t __NC(lseek)(int fd, off_t offset attribute_unused, int whence)
#endif
CANCELLABLE_SYSCALL(off_t, lseek, (int fd, off_t offset, int whence), (fd, offset, whence))
lt_libc_hidden(lseek)
-#if defined __UCLIBC_HAS_LFS__ && (__WORDSIZE == 64 || (!defined __NR__llseek && !defined __NR_llseek))
+#if __WORDSIZE == 64 || (!defined __NR__llseek && !defined __NR_llseek)
strong_alias_untyped(__NC(lseek),__NC(lseek64))
strong_alias_untyped(lseek,lseek64)
lt_strong_alias(lseek64)