pkgsrc/devel/glib2/patches/patch-ce
tsutsui 8f67b9acd4 Fix build failure on NetBSD/arm 6.1. PR/47941
- fix configure scripts to detect !G_ATOMIC_LOCK_FREE correctly
   (use AC_TRY_LINK rather than AC_TRY_COMPILE to see if symbols are defined)
 - fix prototype mismatches in !G_ATOMIC_LOCK_FREE case
   (note no binary changes in G_ATOMIC_LOCK_FREE case)

"please commit it" from agc@.
2013-06-23 04:26:49 +00:00

36 lines
867 B
Text

$NetBSD: patch-ce,v 1.6 2013/06/23 04:26:49 tsutsui Exp $
Fix inconsistency of .hidden attributes, leading to link error on amd64,
reported by Tobias Nygren.
--- glib/gatomic.c.orig 2013-06-09 22:03:17.000000000 +0000
+++ glib/gatomic.c
@@ -22,6 +22,7 @@
#include "config.h"
#include "gatomic.h"
+#include "gthreadprivate.h"
/**
* SECTION:atomic_operations
@@ -682,7 +683,7 @@ gsize
static pthread_mutex_t g_atomic_lock = PTHREAD_MUTEX_INITIALIZER;
gint
-(g_atomic_int_get) (volatile gint *atomic)
+(g_atomic_int_get) (const volatile gint *atomic)
{
gint value;
@@ -797,9 +798,9 @@ guint
gpointer
-(g_atomic_pointer_get) (volatile void *atomic)
+(g_atomic_pointer_get) (const volatile void *atomic)
{
- volatile gpointer *ptr = atomic;
+ const volatile gpointer *ptr = atomic;
gpointer value;
pthread_mutex_lock (&g_atomic_lock);