0001-fix-compile-time-atomic-detection.patch 1.0 KB

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