[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 24/31] win32: use glib gpoll if glib >= 2.50
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PULL 24/31] win32: use glib gpoll if glib >= 2.50 |
Date: |
Tue, 24 Jan 2017 12:39:28 +0300 |
From: Marc-André Lureau <address@hidden>
A fix has been committed in upstream glib commit
210a9796f78eb90f76f1bd6a304e9fea05e97617.
(See also related bug https://bugzilla.gnome.org/show_bug.cgi?id=764415)
It is desirable to use the glib version instead of qemu copy, since it
provides more debugging facilities (G_MAIN_POLL_DEBUG etc), and
hopefully has a better maintainance. Hopefully, we can drop the qemu
copy in a few years.
Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Daniel P. Berrange <address@hidden>
Reviewed-by: Stefan Weil <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
include/glib-compat.h | 2 +-
util/oslib-win32.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/glib-compat.h b/include/glib-compat.h
index acf254d..0cd24ff 100644
--- a/include/glib-compat.h
+++ b/include/glib-compat.h
@@ -39,7 +39,7 @@ static inline gint64 qemu_g_get_monotonic_time(void)
#define g_get_monotonic_time() qemu_g_get_monotonic_time()
#endif
-#ifdef _WIN32
+#if defined(_WIN32) && !GLIB_CHECK_VERSION(2, 50, 0)
/*
* g_poll has a problem on Windows when using
* timeouts < 10ms, so use wrapper.
diff --git a/util/oslib-win32.c b/util/oslib-win32.c
index d09863c..0b1890f 100644
--- a/util/oslib-win32.c
+++ b/util/oslib-win32.c
@@ -327,6 +327,7 @@ char *qemu_get_exec_dir(void)
return g_strdup(exec_dir);
}
+#if !GLIB_CHECK_VERSION(2, 50, 0)
/*
* The original implementation of g_poll from glib has a problem on Windows
* when using timeouts < 10 ms.
@@ -530,6 +531,7 @@ gint g_poll(GPollFD *fds, guint nfds, gint timeout)
return retval;
}
+#endif
int getpagesize(void)
{
--
2.1.4
- [Qemu-devel] [PULL 29/31] gdbstub.c: update old error report statements, (continued)
- [Qemu-devel] [PULL 29/31] gdbstub.c: update old error report statements, Michael Tokarev, 2017/01/24
- [Qemu-devel] [PULL 21/31] vfio: remove a duplicated word in comments, Michael Tokarev, 2017/01/24
- [Qemu-devel] [PULL 27/31] scsi-disk: add 'fall through' comment to switch VERIFY cases, Michael Tokarev, 2017/01/24
- [Qemu-devel] [PULL 18/31] lm32: milkymist-tmu2: fix another integer overflow, Michael Tokarev, 2017/01/24
- [Qemu-devel] [PULL 23/31] util/mmap-alloc: refactor a little bit for readability, Michael Tokarev, 2017/01/24
- [Qemu-devel] [PULL 08/31] usb: Fix typo in documentation, Michael Tokarev, 2017/01/24
- [Qemu-devel] [PULL 04/31] Fix documentation and some comments (article, grammar), Michael Tokarev, 2017/01/24
- [Qemu-devel] [PULL 10/31] object: make some funcs static, Michael Tokarev, 2017/01/24
- [Qemu-devel] [PULL 20/31] docs: sync pci-ids.txt, Michael Tokarev, 2017/01/24
- [Qemu-devel] [PULL 14/31] block: remove dead check, Michael Tokarev, 2017/01/24
- [Qemu-devel] [PULL 24/31] win32: use glib gpoll if glib >= 2.50,
Michael Tokarev <=
- [Qemu-devel] [PULL 26/31] Drop duplicate display option documentation, Michael Tokarev, 2017/01/24
- Re: [Qemu-devel] [PULL 00/31] Trivial patches for 2017-01-24, no-reply, 2017/01/24
- Re: [Qemu-devel] [PULL 00/31] Trivial patches for 2017-01-24, Peter Maydell, 2017/01/24
- Re: [Qemu-devel] [PULL 00/31] Trivial patches for 2017-01-24, Peter Maydell, 2017/01/24
- [Qemu-devel] [PULL 00/31] Trivial patches for 2017-01-24, Michael Tokarev, 2017/01/24