diff options
author | Guo Ren <ren_guo@c-sky.com> | 2018-04-13 16:24:41 +0800 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2018-04-13 16:35:34 +0100 |
commit | ad6c75c4710c9366f284dace3fc600346b70c9cb (patch) | |
tree | e13fb39d543c7846dbe541a439af38ec9fb3ab05 /libc | |
parent | b00fd230ed0b49b9f23d829ad5d09859f34bb754 (diff) |
lseek.c: bugfix ltp lseek01.c
Ref the implement from the glibc and high=0 seems so bad.
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Diffstat (limited to 'libc')
-rw-r--r-- | libc/sysdeps/linux/common/lseek.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/common/lseek.c b/libc/sysdeps/linux/common/lseek.c index 33df822bd..80d69318a 100644 --- a/libc/sysdeps/linux/common/lseek.c +++ b/libc/sysdeps/linux/common/lseek.c @@ -19,8 +19,9 @@ off_t __NC(lseek)(int fd, off_t offset, int whence) { #if __WORDSIZE == 32 __off64_t result; - __off_t high = 0; - return INLINE_SYSCALL(llseek, 5, fd, high, offset, &result, whence) ?: result; + return INLINE_SYSCALL(llseek, 5, fd, + (long) (((uint64_t) (offset)) >> 32), + (long) offset, &result, whence) ?: result; #else return lseek64(fd, offset, whence); #endif |