libglib2-0004-fix-build-when-no-thread-support.patch 952 B

12345678910111213141516171819202122232425262728
  1. Fix gio/gcancellable.c build when thread support is disabled
  2. Signed-off-by: "Samuel Martin" <s.martin49@gmail.com>
  3. ---
  4. --- a/gio/gcancellable.c 2013-05-14 23:08:25.514461348 +0200
  5. +++ b/gio/gcancellable.c 2013-05-14 23:10:23.347789625 +0200
  6. @@ -270,8 +270,10 @@ g_cancellable_reset (GCancellable *cance
  7. while (priv->cancelled_running)
  8. {
  9. priv->cancelled_running_waiting = TRUE;
  10. +#if defined(G_THREADS_ENABLED)
  11. g_cond_wait (cancellable_cond,
  12. g_static_mutex_get_mutex (& G_LOCK_NAME (cancellable)));
  13. +#endif
  14. }
  15. if (priv->cancelled)
  16. @@ -619,8 +621,10 @@ g_cancellable_disconnect (GCancellable
  17. while (priv->cancelled_running)
  18. {
  19. priv->cancelled_running_waiting = TRUE;
  20. +#if defined(G_THREADS_ENABLED)
  21. g_cond_wait (cancellable_cond,
  22. g_static_mutex_get_mutex (& G_LOCK_NAME (cancellable)));
  23. +#endif
  24. }
  25. g_signal_handler_disconnect (cancellable, handler_id);