Le 05/03/2020 à 20:48, Alistair Francis a écrit : > New y2038 safe 32-bit architectures (like RISC-V) don't support old > syscalls with a 32-bit time_t. The kernel defines new *_time64 versions > of these syscalls. Add some more #ifdefs to syscall.c in linux-user to > allow us to compile without these old syscalls.
You should split this patch it two parts: - one to add the needed "#ifdef" - one to manage the futex_time64 case For the futex_time64 you need the same work as in PATCH 2: use target_to_host_timespec64() with TARGET_NR_futex_time64. It's a little bit hacky to alias __NR_sys_futex to __NR_futex_time64, and works only if timespec defined on the system is the 64bit version. A better way to do that would be to define both, __NR_sys_futex and __NR_sys_futex_time64 (according to the availability of their defines), and then to call safe_futex_time64() and if it fails because of -ENOSYS to try safe_futex() (we need to use __kernel_timespec and __kernel_old_timespec accordingly). Thanks, Laurent