aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/glib-2.0/g_once_init_enter.patch
blob: a2a506c2adae9f3b1552cc5861589708af8f9a8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
fix g_once_init_enter compile failure

Kernelshark trips over a compile bug in glib-2.0 addressed by Open Embedded
back in the 2.22 timeframe. It appears to still be present in 2.27.

http://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg005

Signed-off-by: Darren Hart <dvhart@linux.intel.com>

Index: glib-2.27.5/glib/gthread.h
===================================================================
--- glib-2.27.5.orig/glib/gthread.h
+++ glib-2.27.5/glib/gthread.h
@@ -344,7 +344,7 @@ void                    g_once_init_leav
 G_INLINE_FUNC gboolean
 g_once_init_enter (volatile gsize *value_location)
 {
-  if G_LIKELY ((gpointer) g_atomic_pointer_get (value_location) != NULL)
+  if G_LIKELY ((gpointer) g_atomic_pointer_get ((volatile gpointer *)value_location) != NULL)
     return FALSE;
   else
     return g_once_init_enter_impl (value_location);