aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt/pkg/files/patch-powerpc-no-atomic-builtins
blob: beb33dd46b780bb915d67ddbd3a453ce725be2b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- external/libucl/src/ucl_util.c.orig	2014-06-12 01:37:02 +0800
+++ external/libucl/src/ucl_util.c
@@ -160,7 +160,7 @@ static void
 ucl_object_dtor_unref_single (ucl_object_t *obj)
 {
 	if (obj != NULL) {
-#ifdef HAVE_ATOMIC_BUILTINS
+#if defined(HAVE_ATOMIC_BUILTINS) && !defined(__powerpc__)
 		unsigned int rc = __sync_sub_and_fetch (&obj->ref, 1);
 		if (rc == 0) {
 #else
@@ -1850,7 +1850,7 @@ ucl_object_ref (const ucl_object_t *obj)
 
 	if (obj != NULL) {
 		res = __DECONST (ucl_object_t *, obj);
-#ifdef HAVE_ATOMIC_BUILTINS
+#if defined(HAVE_ATOMIC_BUILTINS) && !defined(__powerpc__)
 		(void)__sync_add_and_fetch (&res->ref, 1);
 #else
 		res->ref ++;
@@ -1863,7 +1863,7 @@ void
 ucl_object_unref (ucl_object_t *obj)
 {
 	if (obj != NULL) {
-#ifdef HAVE_ATOMIC_BUILTINS
+#if defined(HAVE_ATOMIC_BUILTINS) && !defined(__powerpc__)
 		unsigned int rc = __sync_sub_and_fetch (&obj->ref, 1);
 		if (rc == 0) {
 #else