diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-06-28 18:32:42 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-06-29 16:49:40 +0200 |
commit | 634d39b4e3e5736b73c55b0fcc113e81246a7057 (patch) | |
tree | 77024f54cf47a439e4b3ad9a4026b99bf2e345a9 /tests/vhost-user-test.c | |
parent | 66f37d360b3fc91275ab6ca3de81f0d356c24b4a (diff) | |
download | qemu-634d39b4e3e5736b73c55b0fcc113e81246a7057.zip qemu-634d39b4e3e5736b73c55b0fcc113e81246a7057.tar.gz qemu-634d39b4e3e5736b73c55b0fcc113e81246a7057.tar.bz2 |
vhost-user-test: fix g_cond_wait_until compat implementation
This fixes compilation with glib versions up to 2.30, such
as the one in CentOS 6.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/vhost-user-test.c')
-rw-r--r-- | tests/vhost-user-test.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 8b2164b..421d432 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -127,25 +127,12 @@ typedef struct TestServer { int fds_num; int fds[VHOST_MEMORY_MAX_NREGIONS]; VhostUserMemory memory; - GMutex data_mutex; - GCond data_cond; + CompatGMutex data_mutex; + CompatGCond data_cond; int log_fd; uint64_t rings; } TestServer; -#if !GLIB_CHECK_VERSION(2, 32, 0) -static gboolean g_cond_wait_until(CompatGCond cond, CompatGMutex mutex, - gint64 end_time) -{ - gboolean ret = FALSE; - end_time -= g_get_monotonic_time(); - GTimeVal time = { end_time / G_TIME_SPAN_SECOND, - end_time % G_TIME_SPAN_SECOND }; - ret = g_cond_timed_wait(cond, mutex, &time); - return ret; -} -#endif - static const char *tmpfs; static const char *root; |