From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2KDJ-0008Ex-E8 for qemu-devel@nongnu.org; Fri, 27 Nov 2015 09:41:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2KDI-0005eW-ER for qemu-devel@nongnu.org; Fri, 27 Nov 2015 09:41:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2KDI-0005e7-9d for qemu-devel@nongnu.org; Fri, 27 Nov 2015 09:41:28 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 083BFB66AA for ; Fri, 27 Nov 2015 14:41:28 +0000 (UTC) From: marcandre.lureau@redhat.com Date: Fri, 27 Nov 2015 15:41:20 +0100 Message-Id: <1448635280-941-4-git-send-email-marcandre.lureau@redhat.com> In-Reply-To: <1448635280-941-1-git-send-email-marcandre.lureau@redhat.com> References: <1448635280-941-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH for-2.5 3/3] vhost-user-test: fix crash with glib < 2.36 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , mst@redhat.com From: Marc-Andr=C3=A9 Lureau The prepare callback needs to be implemented with glib < 2.36. Signed-off-by: Marc-Andr=C3=A9 Lureau --- tests/vhost-user-test.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 29205ed..4ab48e4 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -506,8 +506,19 @@ test_migrate_source_check(GSource *source) return FALSE; } =20 +#if !GLIB_CHECK_VERSION(2,36,0) +static gboolean +test_migrate_source_prepare(GSource *source, gint *timeout) +{ + *timeout =3D -1; + return FALSE; +} +#endif + GSourceFuncs test_migrate_source_funcs =3D { - NULL, +#if !GLIB_CHECK_VERSION(2,36,0) + test_migrate_source_prepare, +#endif test_migrate_source_check, NULL, NULL --=20 2.5.0