2017-06-21 23:01:03 +02:00
|
|
|
From d5c628a6179b99705fa05ab87437321b132c81bc Mon Sep 17 00:00:00 2001
|
|
|
|
From: Brendan Heading <brendanheading@gmail.com>
|
|
|
|
Date: Wed, 21 Jun 2017 16:36:15 -0400
|
|
|
|
Subject: [PATCH] Fix compile time atomic detection
|
2015-07-28 18:40:02 +02:00
|
|
|
|
|
|
|
Improved compile-time detection of atomic support in the compiler.
|
|
|
|
|
2019-05-28 21:48:11 +02:00
|
|
|
Upstream-Status: Merged
|
|
|
|
See : https://gitlab.gnome.org/GNOME/glib/issues/1063
|
2015-07-28 18:40:02 +02:00
|
|
|
|
|
|
|
Signed-off-by: Brendan Heading <brendanheading@gmail.com>
|
2019-07-01 18:30:29 +02:00
|
|
|
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
2015-07-28 18:40:02 +02:00
|
|
|
---
|
|
|
|
glib/gthread-posix.c | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c
|
2017-06-21 23:01:03 +02:00
|
|
|
index 71a6b7b..d09d029 100644
|
2015-07-28 18:40:02 +02:00
|
|
|
--- a/glib/gthread-posix.c
|
|
|
|
+++ b/glib/gthread-posix.c
|
2019-09-16 21:16:04 +02:00
|
|
|
@@ -68,7 +68,7 @@
|
2015-07-28 18:40:02 +02:00
|
|
|
#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
|
|
|
|
|
|
|
|
--
|
2017-06-21 23:01:03 +02:00
|
|
|
2.9.4
|
2015-07-28 18:40:02 +02:00
|
|
|
|