qemu-cr16/bsd-user
Pierrick Bouvier 9707eaa47b bsd-user/syscall_defs.h: define STAT_TIME_T_EXT only for 32 bits
Commit 369c1ba2b changed the wrong conditional "#if defined(__i386__)" to
"#if defined(TARGET_I386)".
However, TARGET_I386 is defined for target x86_64 also.

This commit fixes it by identifying correctly 32 bits target.

Found with:
$ ./build/qemu-x86_64 \
  -plugin ./build/contrib/plugins/libstoptrigger,icount=1000000 \
  -plugin ./build/tests/tcg/plugins/libinsn \
  -d plugin \
  ./build/qemu-system-x86_64 --version
ld-elf.so.1: /lib/libz.so.6: invalid file format
cpu 0 insns: 59746
total insns: 59746

Fixes: 369c1ba2b ("Fix __i386__ test for TARGET_HAS_STAT_TIME_T_EXT")
Fixes: dba028d1b ("Fix __i386__ test for TARGET_HAS_STAT_TIME_T_EXT" in 10.2.x)
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit f0de58ccf6566ad5cf04948788f9b0cfb8b960b4)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-01-21 10:25:42 +03:00
..
aarch64 bsd-user, linux-user: introduce qemu_process_cpu_events 2025-09-17 19:00:56 +02:00
arm * cpu-exec: more cleanups to CPU loop exits 2025-09-18 07:05:59 -07:00
freebsd bsd-user: Simplify the implementation of execve 2024-07-23 10:50:54 -06:00
host bsd-user: Catch up with sys/param.h requirement for machine/pmap.h 2022-10-26 14:09:17 -06:00
i386 bsd-user, linux-user: introduce qemu_process_cpu_events 2025-09-17 19:00:56 +02:00
include user: move common-user includes to a subdirectory of {bsd,linux}-user/ 2022-01-12 14:08:29 +01:00
netbsd exec: Move [b]tswapl() declarations to 'exec/user/tswap-target.h' 2024-04-26 17:03:05 +02:00
openbsd exec: Move [b]tswapl() declarations to 'exec/user/tswap-target.h' 2024-04-26 17:03:05 +02:00
riscv bsd-user, linux-user: introduce qemu_process_cpu_events 2025-09-17 19:00:56 +02:00
x86_64 bsd-user, linux-user: introduce qemu_process_cpu_events 2025-09-17 19:00:56 +02:00
bsd-file.h {linux,bsd}-user: Introduce get_task_state() 2024-03-06 12:35:19 +00:00
bsd-mem.c bsd-user: Implement shmid_ds conversion between host and target. 2023-10-03 17:14:07 -06:00
bsd-mem.h accel/tcg: Add clear_flags argument to page_set_flags 2025-10-14 07:30:39 -07:00
bsd-proc.c bsd-user: Get number of cpus. 2023-10-03 17:14:06 -06:00
bsd-proc.h accel: Introduce AccelClass::cpu_common_[un]realize 2023-10-05 08:55:34 -04:00
bsdload.c bsd-user: TARGET_NGROUPS unused in this file, remove 2021-09-10 14:13:06 -06:00
elfcore.c bsd-user: add stubbed out core dump support 2021-09-10 14:13:06 -06:00
elfload.c exec/cpu-all: remove BSWAP_NEEDED 2025-03-21 12:53:36 +01:00
errno_defs.h bsd-user: spelling fixes 2023-09-20 07:54:34 +03:00
main.c accel/tcg: create a thread-kick function for TCG 2025-09-17 19:00:55 +02:00
meson.build plugins/api: split out binary path/start/end/entry code 2025-03-10 10:30:01 +00:00
mmap.c accel/tcg: Add clear_flags argument to page_set_flags 2025-10-14 07:30:39 -07:00
plugin-api.c plugins/api: split out binary path/start/end/entry code 2025-03-10 10:30:01 +00:00
qemu-bsd.h bsd-user: Declarations for ipc_perm and shmid_ds conversion functions 2023-10-03 17:14:06 -06:00
qemu.h include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
signal-common.h user: Introduce user/signal.h 2025-02-10 13:47:59 +00:00
signal.c accel/tcg: Use vaddr in cpu_loop.h 2025-05-05 09:24:06 -07:00
strace.c exec: Move [b]tswapl() declarations to 'exec/user/tswap-target.h' 2024-04-26 17:03:05 +02:00
syscall_defs.h bsd-user/syscall_defs.h: define STAT_TIME_T_EXT only for 32 bits 2026-01-21 10:25:42 +03:00
trace-events trace-events: Fix the name of the tracing.rst file 2023-09-08 13:08:51 +03:00
trace.h bsd-user: Add trace events for bsd-user 2022-01-28 15:53:41 -07:00
uaccess.c bsd-user: style tweak: keyword space ( 2021-05-11 11:07:22 -06:00