提交 af35e5e1 编写于 作者: P Paolo Bonzini

tests/test-qmp-event: fix for GLib < 2.31

On old GLib, the test needs a g_thread_init call.
Reported-by: NWenchao Xia <wenchaoqemu@gmail.com>
Tested-by: NWenchao Xia <wenchaoqemu@gmail.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 e02bc6de
......@@ -251,6 +251,12 @@ static void test_event_d(TestEventData *data,
int main(int argc, char **argv)
{
#if !GLIB_CHECK_VERSION(2, 31, 0)
if (!g_thread_supported()) {
g_thread_init(NULL);
}
#endif
qmp_event_set_func_emit(event_test_emit);
g_test_init(&argc, &argv, NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册