aboutsummaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2016-02-02 07:51:41 -0700
committerMarkus Armbruster <armbru@redhat.com>2016-02-08 17:29:57 +0100
commit86ae191163d48ff4ff9d9996868e6cfe92a82449 (patch)
treeca8b02e73db0fbc2f2a0629f4b25b51c42c27f3d /hmp.c
parent455ba08afde784466420449d01c6458f88349d55 (diff)
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 <james.hogan@imgtec.com> CC: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Eric Blake <eblake@redhat.com> Tested-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hmp.c')
-rw-r--r--hmp.c8
1 files changed, 5 insertions, 3 deletions
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);