glib: add compatibility interface for g_get_monotonic_time()
This patch fixes compilation errors when building against glib <2.28.0 due to the missing g_get_monotonic_time() function. The compilation error in tests/libqos/virtio.c was introduced in commit 70556264 ("libqos: use microseconds instead of iterations for virtio timeout"). Add a simple g_get_monotonic_time() implementation to glib-compat.h based on code from vhost-user-test.c. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> [Igor: add G_TIME_SPAN_SECOND, include glib-compat.h in libqtest.h] Signed-off-by: NIgor Mammedov <imammedo@redhat.com> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
Showing
想要评论请 注册 或 登录