summaryrefslogtreecommitdiff
path: root/cpus.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 /cpus.c
parent455ba08afde784466420449d01c6458f88349d55 (diff)
downloadqemu-86ae191163d48ff4ff9d9996868e6cfe92a82449.tar.gz
qemu-86ae191163d48ff4ff9d9996868e6cfe92a82449.tar.bz2
qemu-86ae191163d48ff4ff9d9996868e6cfe92a82449.zip
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 'cpus.c')
-rw-r--r--cpus.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpus.c b/cpus.c
index 882b61851a..898426ca56 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1576,13 +1576,13 @@ CpuInfoList *qmp_query_cpus(Error **errp)
info->value->u.ppc->nip = env->nip;
#elif defined(TARGET_SPARC)
info->value->arch = CPU_INFO_ARCH_SPARC;
- info->value->u.sparc = g_new0(CpuInfoSPARC, 1);
- info->value->u.sparc->pc = env->pc;
- info->value->u.sparc->npc = env->npc;
+ info->value->u.q_sparc = g_new0(CpuInfoSPARC, 1);
+ info->value->u.q_sparc->pc = env->pc;
+ info->value->u.q_sparc->npc = env->npc;
#elif defined(TARGET_MIPS)
info->value->arch = CPU_INFO_ARCH_MIPS;
- info->value->u.mips = g_new0(CpuInfoMIPS, 1);
- info->value->u.mips->PC = env->active_tc.PC;
+ info->value->u.q_mips = g_new0(CpuInfoMIPS, 1);
+ info->value->u.q_mips->PC = env->active_tc.PC;
#elif defined(TARGET_TRICORE)
info->value->arch = CPU_INFO_ARCH_TRICORE;
info->value->u.tricore = g_new0(CpuInfoTricore, 1);