On 7/8/23 06:42, Helge Deller wrote:
When running a 32-bit guest on a 64-bit host, fcntl[64](F_GETFL) should
return with the TARGET_O_LARGEFILE flag set, because all 64-bit hosts
support large files unconditionally.

But on 64-bit hosts, O_LARGEFILE has the value 0, so the flag
translation can't be done with the fcntl_flags_tbl[]. Instead add the
TARGET_O_LARGEFILE flag afterwards.

Note that for 64-bit guests the compiler will optimize away this code,
since TARGET_O_LARGEFILE is zero.

Signed-off-by: Helge Deller<del...@gmx.de>
---
  linux-user/syscall.c | 4 ++++
  1 file changed, 4 insertions(+)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

r~

Reply via email to