Commit cf81029c authored by Samuel Martin's avatar Samuel Martin Committed by Peter Korsgaard
Browse files

libglib2: fix build when toolchain has no thread support

parent bed1490d
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
Fix gio/gcancellable.c build when thread support is disabled

Signed-off-by: "Samuel Martin" <s.martin49@gmail.com>
---
--- a/gio/gcancellable.c	2013-05-14 23:08:25.514461348 +0200
+++ b/gio/gcancellable.c	2013-05-14 23:10:23.347789625 +0200
@@ -270,8 +270,10 @@ g_cancellable_reset (GCancellable *cance
   while (priv->cancelled_running)
     {
       priv->cancelled_running_waiting = TRUE;
+#if defined(G_THREADS_ENABLED)
       g_cond_wait (cancellable_cond,
                    g_static_mutex_get_mutex (& G_LOCK_NAME (cancellable)));
+#endif
     }
 
   if (priv->cancelled)
@@ -619,8 +621,10 @@ g_cancellable_disconnect (GCancellable
   while (priv->cancelled_running)
     {
       priv->cancelled_running_waiting = TRUE;
+#if defined(G_THREADS_ENABLED)
       g_cond_wait (cancellable_cond,
                    g_static_mutex_get_mutex (& G_LOCK_NAME (cancellable)));
+#endif
     }
 
   g_signal_handler_disconnect (cancellable, handler_id);
+3 −0
Original line number Diff line number Diff line
@@ -67,6 +67,9 @@ HOST_LIBGLIB2_CONF_OPT = \
		--disable-tests

LIBGLIB2_CONF_OPT += --disable-tests
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
	LIBGLIB2_CONF_OPT += --with-threads=none --disable-threads
endif

LIBGLIB2_DEPENDENCIES = host-pkgconf host-libglib2 libffi zlib $(if $(BR2_NEEDS_GETTEXT),gettext) host-gettext