From: Nikolay Nikolaev Date: Wed, 9 Jul 2014 15:06:32 +0000 (+0300) Subject: qtest: fix vhost-user-test compilation with old GLib X-Git-Tag: qemu-xen-4.6.0-rc1~316^2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=0a58991a5f7efd6eb8a66643f4fd894b9c6874b7;p=qemu-upstream-4.6-testing.git qtest: fix vhost-user-test compilation with old GLib Mising G_TIME_SPAN_SECOND definition breaks the RHEL6 compilation as GLib version before 2.26 does not have it. In such case just define it. Reported-by: Kevin Wolf Signed-off-by: Nikolay Nikolaev Signed-off-by: Paolo Bonzini --- diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 2af2381a1..406ba7094 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -22,6 +22,10 @@ #include /* GLIB version compatibility flags */ +#if !GLIB_CHECK_VERSION(2, 26, 0) +#define G_TIME_SPAN_SECOND (G_GINT64_CONSTANT(1000000)) +#endif + #if GLIB_CHECK_VERSION(2, 28, 0) #define HAVE_MONOTONIC_TIME #endif