From 1f001dc7bc9e435bf231a5b0edcad1c7c2bd6214 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 2 Nov 2012 15:43:20 +0100 Subject: compiler: support Darwin weak references Weakrefs only tell you if the symbol was defined elsewhere, so you need a further check at runtime to pick the default definition when needed. This could be automated by the compiler, but it does not do it. Signed-off-by: Paolo Bonzini Signed-off-by: Anthony Liguori --- qmp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qmp.c') diff --git a/qmp.c b/qmp.c index 638888a64e..13e83a59e0 100644 --- a/qmp.c +++ b/qmp.c @@ -477,6 +477,8 @@ static CpuDefinitionInfoList *default_arch_query_cpu_definitions(Error **errp) return NULL; } QEMU_WEAK_ALIAS(arch_query_cpu_definitions, default_arch_query_cpu_definitions); +#define arch_query_cpu_definitions \ + QEMU_WEAK_REF(arch_query_cpu_definitions, default_arch_query_cpu_definitions) CpuDefinitionInfoList *qmp_query_cpu_definitions(Error **errp) { -- cgit v1.2.1