Re: [PATCH 1/7] tools/nolibc: also handle _llseek system call
From: David Laight
Date: Sat Apr 18 2026 - 07:26:06 EST
On Sat, 18 Apr 2026 12:19:56 +0200
Thomas Weißschuh <linux@xxxxxxxxxxxxxx> wrote:
> On some architectures the llseek system call contains a leading
> underscore. Also check for that one and prefer it over the lseek system
> call as it is necessary for 64-bit offset handling.
>
...
> +#if defined(__NR_llseek)
> + nr_llseek = __NR_llseek;
> +#else
> + nr_llseek = __NR__llseek;
> +#endif
Is that test the right way around?
The commit messages says prefer _llseek, but that seems to prefer llseek.
David
> +
> + ret = __nolibc_syscall5(nr_llseek, fd, offset >> 32, (uint32_t)offset, &loff, whence);
> if (ret < 0)
> result = ret;
> else
>