xref: /OK3568_Linux_fs/buildroot/package/libglib2/0001-fix-compile-time-atomic-detection.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From d5c628a6179b99705fa05ab87437321b132c81bc Mon Sep 17 00:00:00 2001
2From: Brendan Heading <brendanheading@gmail.com>
3Date: Wed, 21 Jun 2017 16:36:15 -0400
4Subject: [PATCH] Fix compile time atomic detection
5
6Improved compile-time detection of atomic support in the compiler.
7
8Upstream-Status: 'Needs information'
9See : https://gitlab.gnome.org/GNOME/glib/issues/1063
10
11Signed-off-by: Brendan Heading <brendanheading@gmail.com>
12Signed-off-by: Adam Duskett <aduskett@gmail.com>
13Refresh for 2.68.1
14---
15 glib/gthread-posix.c | 3 +--
16 1 file changed, 1 insertion(+), 2 deletions(-)
17
18diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c
19index 71a6b7b..d09d029 100644
20--- a/glib/gthread-posix.c
21+++ b/glib/gthread-posix.c
22@@ -72,8 +72,7 @@
23 #include <sys/syscall.h>
24 #endif
25
26-#if defined(HAVE_FUTEX) && \
27-    (defined(HAVE_STDATOMIC_H) || defined(__ATOMIC_SEQ_CST))
28+#if defined(HAVE_FUTEX) && defined(__ATOMIC_SEQ_CST) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) && !defined(__clang__)
29 #define USE_NATIVE_MUTEX
30 #endif
31
32--
332.9.4
34
35