summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNikolay Nikolaev <n.nikolaev@virtualopensystems.com>2014-07-09 18:06:32 +0300
committerKevin Wolf <kwolf@redhat.com>2014-07-14 12:03:21 +0200
commit80504dcaa11097b99842312014f5954a54fe1826 (patch)
tree50c0803c2568a61403ae1c5cfeed9bf286d3d6a9 /tests
parentb8864245b140c801e826de4acf6d6516e2c550b2 (diff)
downloadqemu-80504dcaa11097b99842312014f5954a54fe1826.tar.gz
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 <kwolf@redhat.com> Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com> Tested-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/vhost-user-test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 2af2381a1d..406ba70941 100644
--- a/tests/vhost-user-test.c
+++ b/tests/vhost-user-test.c
@@ -22,6 +22,10 @@
#include <qemu/sockets.h>
/* 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