Commit d93d0593 authored by Thomas Weißschuh's avatar Thomas Weißschuh
Browse files

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: default avatarThomas Weißschuh <linux@weissschuh.net>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarWilly Tarreau <w@1wt.eu>
parent 87506e44
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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)