On Tue, Feb 25, 2020 at 3:59 AM Laurent Vivier <laur...@vivier.eu> wrote: > > Le 25/02/2020 à 00:21, 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. > > > > Signed-off-by: Alistair Francis <alistair.fran...@wdc.com> > > Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com> > > --- > > linux-user/strace.c | 2 ++ > > linux-user/syscall.c | 20 ++++++++++++++++++++ > > 2 files changed, 22 insertions(+) > > > > diff --git a/linux-user/strace.c b/linux-user/strace.c > > index 4f7130b2ff..6420ccd97b 100644 > > --- a/linux-user/strace.c > > +++ b/linux-user/strace.c > > @@ -775,6 +775,7 @@ print_syscall_ret_newselect(const struct syscallname > > *name, abi_long ret) > > #define TARGET_TIME_OOP 3 /* leap second in progress */ > > #define TARGET_TIME_WAIT 4 /* leap second has occurred */ > > #define TARGET_TIME_ERROR 5 /* clock not synchronized */ > > +#ifdef TARGET_NR_adjtimex > > static void > > print_syscall_ret_adjtimex(const struct syscallname *name, abi_long ret) > > { > > @@ -813,6 +814,7 @@ print_syscall_ret_adjtimex(const struct syscallname > > *name, abi_long ret) > > > > qemu_log("\n"); > > } > > +#endif > > > > UNUSED static struct flags access_flags[] = { > > FLAG_GENERIC(F_OK), > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > > index 8d27d10807..5a2156f95a 100644 > > --- a/linux-user/syscall.c > > +++ b/linux-user/syscall.c > > @@ -742,8 +742,10 @@ safe_syscall3(ssize_t, read, int, fd, void *, buff, > > size_t, count) > > safe_syscall3(ssize_t, write, int, fd, const void *, buff, size_t, count) > > safe_syscall4(int, openat, int, dirfd, const char *, pathname, \ > > int, flags, mode_t, mode) > > +#if defined(TARGET_NR_wait4) > > safe_syscall4(pid_t, wait4, pid_t, pid, int *, status, int, options, \ > > struct rusage *, rusage) > > safe_wait4 is also used in TARGET_NR_waitpid
Fixed! Alistair > > Thanks, > Laurent