summary refs log tree commit diff stats
path: root/linux-user/strace.c
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2020-03-12 15:13:49 -0700
committerLaurent Vivier <laurent@vivier.eu>2020-03-20 16:01:46 +0100
commit859e8a89bede1ba1bdc2dda7a76a861e63cfd49f (patch)
treebb86a2da7d044bf41c8838d42833675c33ddd40b /linux-user/strace.c
parentaab613fb9597015b39bdc90da3ee80c0da05b927 (diff)
downloadfocaccia-qemu-859e8a89bede1ba1bdc2dda7a76a861e63cfd49f.tar.gz
focaccia-qemu-859e8a89bede1ba1bdc2dda7a76a861e63cfd49f.zip
linux-user: Protect more syscalls
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.francis@wdc.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <9ffc3cc6226756895157f16622be5f6edfa2aee6.1584051142.git.alistair.francis@wdc.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/strace.c')
-rw-r--r--linux-user/strace.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 69232f7e27..0d9095c674 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -781,6 +781,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)
 {
@@ -819,6 +820,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),