diff options
| author | Thomas Weißschuh <linux@weissschuh.net> | 2025-10-29 17:02:52 +0100 |
|---|---|---|
| committer | Thomas Weißschuh <linux@weissschuh.net> | 2025-11-20 19:46:45 +0100 |
| commit | d93d0593dd65b8cd72d6dc9bda7fc4982fd65afb (patch) | |
| tree | 45cb5967d222a1e5116e95ebbae0b78b8cdb65f5 /tools/include | |
| parent | 87506e44cb85cc1c2bf70b3d496b674178f219bd (diff) | |
tools/nolibc: handle 64-bit off_t for llseek
Correctly handle 64-bit off_t values in preparation for 64-bit off_t on
32-bit architectures.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'tools/include')
| -rw-r--r-- | tools/include/nolibc/sys.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index fcc36cffad4d..2b186d1af52e 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -612,8 +612,7 @@ off_t sys_lseek(int fd, off_t offset, int whence) off_t result; int ret; - /* Only exists on 32bit where nolibc off_t is also 32bit */ - ret = my_syscall5(__NR_llseek, fd, 0, offset, &loff, whence); + ret = my_syscall5(__NR_llseek, fd, offset >> 32, (uint32_t)offset, &loff, whence); if (ret < 0) result = ret; else if (loff != (off_t)loff) |