qtest: fix vhost-user-test compilation with old GLib
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
@@ -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
Am 09.07.2014 um 17:06 hat Nikolay Nikolaev geschrieben:
Quoted 5 lines
Mising
G_TIME_SPAN_SECONDdefinition breaks the RHEL6 compilation as GLib version before 2.26 does not have it. In such case just define it.Reported-by Kevin Wolf <[email protected]>Signed-off-by Nikolay Nikolaev <[email protected]>
Thanks, this fixes the build for me.
Michael S. Tsirkin
AppliedQuoted 5 lines · Nikolay Nikolaev
Mising
G_TIME_SPAN_SECONDdefinition breaks the RHEL6 compilation as GLib version before 2.26 does not have it. In such case just define it.Reported-by Kevin Wolf <[email protected]>Signed-off-by Nikolay Nikolaev <[email protected]>
Applied, thanks!
Quoted 19 lines
--- tests/vhost-user-test.c | 4 ++++ 1 file changed, 4 insertions(+)tests/vhost-user-test.c +4
-0@@ -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
Quoted 8 lines · Michael S. Tsirkin
Quoted 5 lines · Nikolay Nikolaev
Mising
G_TIME_SPAN_SECONDdefinition breaks the RHEL6 compilation as GLib version before 2.26 does not have it. In such case just define it.Reported-by Kevin Wolf <[email protected]>Signed-off-by Nikolay Nikolaev <[email protected]>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@@ -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
Peter Maydell
AppliedQuoted 8 lines · Michael S. Tsirkin
Quoted 5 lines · Nikolay Nikolaev
Mising
G_TIME_SPAN_SECONDdefinition breaks the RHEL6 compilation as GLib version before 2.26 does not have it. In such case just define it.Reported-by Kevin Wolf <[email protected]>Signed-off-by Nikolay Nikolaev <[email protected]>Applied, thanks!
Applied to what? This is already in master as commit 0a58991a (via Paolo's kvm tree).
thanks
-- PMM