summaryrefslogtreecommitdiff
path: root/package/libglib2/0001-fix-compile-time-atomic-detection.patch
blob: f6d0c5d6a5a2ed11557762d3f4c2ff7d0280bd6c (plain)
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
[PATCH] Fix compilation issues on architectures with limited atomic support

Improved compile-time detection of atomic support in the compiler.

Upstream-Status: submitted
See : https://bugzilla.gnome.org/show_bug.cgi?id=752731

Signed-off-by: Brendan Heading <brendanheading@gmail.com>
---
 glib/gthread-posix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c
index ae5d805..8db8557 100644
--- a/glib/gthread-posix.c
+++ b/glib/gthread-posix.c
@@ -67,7 +67,7 @@
 #endif
 
 /* clang defines __ATOMIC_SEQ_CST but doesn't support the GCC extension */
-#if defined(HAVE_FUTEX) && defined(__ATOMIC_SEQ_CST) && !defined(__clang__)
+#if defined(HAVE_FUTEX) && defined(__ATOMIC_SEQ_CST) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) && !defined(__clang__)
 #define USE_NATIVE_MUTEX
 #endif
 
-- 
2.4.3