Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -2
+1 -2
tools/include/nolibc/sys.h
··· 612 612 off_t result; 613 613 int ret; 614 614 615 - /* Only exists on 32bit where nolibc off_t is also 32bit */ 616 - ret = my_syscall5(__NR_llseek, fd, 0, offset, &loff, whence); 615 + ret = my_syscall5(__NR_llseek, fd, offset >> 32, (uint32_t)offset, &loff, whence); 617 616 if (ret < 0) 618 617 result = ret; 619 618 else if (loff != (off_t)loff)