|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [qemu-upstream-unstable] glib-compat: fix problems with not-quite glib 2.22
commit 6a47d1ef7af7f5df35986b5084ce61a2255b649e
Author: Cornelia Huck <cornelia.huck@xxxxxxxxxx>
AuthorDate: Thu Apr 2 17:17:45 2015 +0200
Commit: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
CommitDate: Thu Apr 23 14:04:33 2015 +0000
glib-compat: fix problems with not-quite glib 2.22
Commit 89b516d8b9444ece8ccabb322a9389587c7a7b83 ("glib: add
compatibility interface for g_get_monotonic_time()") aimed
at making qemu build with old glib versions. At least SLES11SP3,
however, contains a backport of g_get_monotonic_time() while
keeping the reported glib version at 2.22.
Let's work around this by a strategically placed #define.
upstream-commit-id: 14655e9a18276d67eebad62a9c388ca5964bb353
Signed-off-by: Cornelia Huck <cornelia.huck@xxxxxxxxxx>
Message-id: 1427987865-433-2-git-send-email-cornelia.huck@xxxxxxxxxx
Signed-off-by: Peter Maydell <peter.maydell@xxxxxxxxxx>
---
include/glib-compat.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/include/glib-compat.h b/include/glib-compat.h
index f0615c9..011352b 100644
--- a/include/glib-compat.h
+++ b/include/glib-compat.h
@@ -32,7 +32,7 @@ static inline guint g_timeout_add_seconds(guint interval,
GSourceFunc function,
#endif
#if !GLIB_CHECK_VERSION(2, 28, 0)
-static inline gint64 g_get_monotonic_time(void)
+static inline gint64 qemu_g_get_monotonic_time(void)
{
/* g_get_monotonic_time() is best-effort so we can use the wall clock as a
* fallback.
@@ -43,6 +43,8 @@ static inline gint64 g_get_monotonic_time(void)
return time.tv_sec * G_TIME_SPAN_SECOND + time.tv_usec;
}
+/* work around distro backports of this interface */
+#define g_get_monotonic_time() qemu_g_get_monotonic_time()
#endif
#if !GLIB_CHECK_VERSION(2, 16, 0)
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |