From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 2/2] tests/test-qmp-event: fix for GLib < 2.31
Date: Mon, 30 Jun 2014 15:13:03 +0200 [thread overview]
Message-ID: <1404133983-30765-3-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1404133983-30765-1-git-send-email-pbonzini@redhat.com>
On old GLib, the test needs a g_thread_init call.
Reported-by: Wenchao Xia <wenchaoqemu@gmail.com>
Tested-by: Wenchao Xia <wenchaoqemu@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
tests/test-qmp-event.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/test-qmp-event.c b/tests/test-qmp-event.c
index cb1e441..cb354e6 100644
--- a/tests/test-qmp-event.c
+++ b/tests/test-qmp-event.c
@@ -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);
--
1.9.3
next prev parent reply other threads:[~2014-06-30 13:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-30 13:13 [Qemu-devel] [PULL for-2.1 0/2] Small fixes for qemu-char and test-qmp-event Paolo Bonzini
2014-06-30 13:13 ` [Qemu-devel] [PULL 1/2] serial: poll the serial console with G_IO_HUP Paolo Bonzini
2014-06-30 13:13 ` Paolo Bonzini [this message]
2014-06-30 15:13 ` [Qemu-devel] [PULL for-2.1 0/2] Small fixes for qemu-char and test-qmp-event Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1404133983-30765-3-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).