On emscripten, function pointer casts can cause function call failure.
This commit fixes the function definition to match to the type of the
function call using g_slist_sort_with_data.
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
---
system/vl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/system/vl.c b/system/vl.c
index ec93988a03..8d89394b45 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -1523,7 +1523,7 @@ static bool debugcon_parse(const char *devname, Error **errp)
return true;
}
-static gint machine_class_cmp(gconstpointer a, gconstpointer b)
+static gint machine_class_cmp(gconstpointer a, gconstpointer b, gpointer d)
{
const MachineClass *mc1 = a, *mc2 = b;
int res;
@@ -1573,7 +1573,7 @@ static void machine_help_func(const QDict *qdict)
}
printf("Supported machines are:\n");
- machines = g_slist_sort(machines, machine_class_cmp);
+ machines = g_slist_sort_with_data(machines, machine_class_cmp, NULL);
for (el = machines; el; el = el->next) {
MachineClass *mc = el->data;
if (mc->alias) {
--
2.25.1