Skip to contentSkip to conversation

qtest: fix vhost-user-test compilation with old GLib

PATCH Applied Nikolay Nikolaev 4 participants 5 messages Jul 9, 2014 – Jul 13, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 tests/vhost-user-test.c |    4 ++++
 1 file changed, 4 insertions(+)
tests/vhost-user-test.c +4 -0
index b9dcec1..75fedf0 100644
@@ -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
#2 lore raw
In reply to Nikolay Nikolaev
Quoted 5 lines · Nikolay Nikolaev

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.

Applied, thanks!

Quoted 19 lines
---
 tests/vhost-user-test.c |    4 ++++
 1 file changed, 4 insertions(+)
tests/vhost-user-test.c +4 -0
index b9dcec1..75fedf0 100644
@@ -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
#3 lore raw
Quoted 8 lines · Michael S. Tsirkin
Quoted 5 lines · Nikolay Nikolaev

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.

Applied, thanks!

but again please put for-2.1 in subject.

Quoted 19 lines
Quoted 19 lines
---
 tests/vhost-user-test.c |    4 ++++
 1 file changed, 4 insertions(+)
tests/vhost-user-test.c +4 -0
index b9dcec1..75fedf0 100644
@@ -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
#4 lore raw
In reply to Michael S. Tsirkin
Quoted 8 lines · Michael S. Tsirkin
Quoted 5 lines · Nikolay Nikolaev

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.

Applied, thanks!

Applied to what? This is already in master as commit 0a58991a (via Paolo's kvm tree).

thanks
-- PMM