From: Mike Frysinger Date: Fri, 8 Dec 2023 04:40:00 +0000 (-0700) Subject: sim: m32r: fix syslog call X-Git-Tag: binutils-2_42~679 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c26f7543b2ccd006e8251be0b62a4a785ed1cc2f;p=thirdparty%2Fbinutils-gdb.git sim: m32r: fix syslog call The function returns void, not int. We only pass one argument to syslog (the format), so use %s as the static format instead since the emulation layer doesn't handle passing additional arguments. --- diff --git a/sim/m32r/traps.c b/sim/m32r/traps.c index 80c4360235b..51fe0d484a5 100644 --- a/sim/m32r/traps.c +++ b/sim/m32r/traps.c @@ -843,7 +843,8 @@ m32r_trap (SIM_CPU *current_cpu, PCADDR pc, int num) break; case TARGET_LINUX_SYS_syslog: - result = syslog (arg1, (char *) t2h_addr (cb, &s, arg2)); + syslog (arg1, "%s", (char *) t2h_addr (cb, &s, arg2)); + result = 0; errcode = errno; break;