From 86ae191163d48ff4ff9d9996868e6cfe92a82449 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 2 Feb 2016 07:51:41 -0700 Subject: qapi: Fix compilation failure on MIPS and SPARC Commit 86f4b687 broke compilation on MIPS and SPARC, which have a preprocessor pollution of '#define mips 1' and '#define sparc 1', respectively. Treat it the same way as we do for the pollution with 'unix', so that QMP remains backwards compatible and only the C code needs to use the alternative 'q_mips', 'q_sparc' spelling. CC: James Hogan CC: Peter Maydell Signed-off-by: Eric Blake Tested-by: James Hogan Signed-off-by: Markus Armbruster --- hmp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'hmp.c') diff --git a/hmp.c b/hmp.c index 3e2a9891c4..c6419da72f 100644 --- a/hmp.c +++ b/hmp.c @@ -319,11 +319,13 @@ void hmp_info_cpus(Monitor *mon, const QDict *qdict) monitor_printf(mon, " nip=0x%016" PRIx64, cpu->value->u.ppc->nip); break; case CPU_INFO_ARCH_SPARC: - monitor_printf(mon, " pc=0x%016" PRIx64, cpu->value->u.sparc->pc); - monitor_printf(mon, " npc=0x%016" PRIx64, cpu->value->u.sparc->npc); + monitor_printf(mon, " pc=0x%016" PRIx64, + cpu->value->u.q_sparc->pc); + monitor_printf(mon, " npc=0x%016" PRIx64, + cpu->value->u.q_sparc->npc); break; case CPU_INFO_ARCH_MIPS: - monitor_printf(mon, " PC=0x%016" PRIx64, cpu->value->u.mips->PC); + monitor_printf(mon, " PC=0x%016" PRIx64, cpu->value->u.q_mips->PC); break; case CPU_INFO_ARCH_TRICORE: monitor_printf(mon, " PC=0x%016" PRIx64, cpu->value->u.tricore->PC); -- cgit v1.2.3