Message ID | 50D12A72.6030801@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 908a558..ad0763e 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -10446,13 +10446,14 @@ static void ppc_cpu_def_class_init(ObjectClass *oc, void *data) static void ppc_cpu_register_model(const ppc_def_t *def) { TypeInfo type_info = { - .name = def->name, .parent = TYPE_POWERPC_CPU, .class_init = ppc_cpu_def_class_init, .class_data = (void *)def, }; + type_info.name = g_strdup_printf("%s-" TYPE_POWERPC_CPU, def->name), type_register(&type_info); + g_free((gpointer)type_info.name); }