diff options
Diffstat (limited to 'recipes/glib')
-rw-r--r-- | recipes/glib/uwp/0001-gpoll-UWP-does-not-need-to-poll-a-msg_fd.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/recipes/glib/uwp/0001-gpoll-UWP-does-not-need-to-poll-a-msg_fd.patch b/recipes/glib/uwp/0001-gpoll-UWP-does-not-need-to-poll-a-msg_fd.patch new file mode 100644 index 00000000..e95c5ece --- /dev/null +++ b/recipes/glib/uwp/0001-gpoll-UWP-does-not-need-to-poll-a-msg_fd.patch @@ -0,0 +1,50 @@ +From 029fc2872786dba06ca5a85294419eb229e080e9 Mon Sep 17 00:00:00 2001 +From: Nirbheek Chauhan <nirbheek@centricular.com> +Date: Thu, 9 Jul 2020 00:04:22 +0530 +Subject: [PATCH] gpoll: UWP does not need to poll a msg_fd + +msg_fd is only set when we need to handle win32 Window Messages, which +are not available when building with UWP. +--- + glib/gpoll.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/glib/gpoll.c b/glib/gpoll.c +index 290c64c..524fd39 100644 +--- a/glib/gpoll.c ++++ b/glib/gpoll.c +@@ -149,8 +149,15 @@ poll_rest (GPollFD *msg_fd, + if (_g_main_poll_debug) + g_print (" MsgWaitForMultipleObjectsEx(%d, %d)\n", nhandles, timeout_ms); + ++#ifdef G_WINAPI_ONLY_APP ++ /* msg_fd is only set when we need to handle win32 Window Messages, which ++ * are not available when building with UWP ++ */ ++ g_assert_not_reached (); ++#else + ready = MsgWaitForMultipleObjectsEx (nhandles, handles, timeout_ms, + QS_ALLINPUT, MWMO_ALERTABLE); ++#endif + + if (ready == WAIT_FAILED) + { +@@ -447,8 +454,15 @@ g_poll (GPollFD *fds, + + /* Wait for at least one thread to return */ + if (msg_fd != NULL) ++#ifdef G_WINAPI_ONLY_APP ++ /* msg_fd is only set when we need to handle win32 Window Messages, which ++ * are not available when building with UWP ++ */ ++ g_assert_not_reached (); ++#else + ready = MsgWaitForMultipleObjectsEx (nthreads, thread_handles, timeout, + QS_ALLINPUT, MWMO_ALERTABLE); ++#endif + else + ready = WaitForMultipleObjects (nthreads, thread_handles, timeout > 0, timeout); + +-- +2.27.0.windows.1 + |