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

1234567891011121314151617181920212223242526272829303132
  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. ---
  11. glib/gthread-posix.c | 2 +-
  12. 1 file changed, 1 insertion(+), 1 deletion(-)
  13. diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c
  14. index 71a6b7b..d09d029 100644
  15. --- a/glib/gthread-posix.c
  16. +++ b/glib/gthread-posix.c
  17. @@ -73,7 +73,7 @@
  18. #endif
  19. /* clang defines __ATOMIC_SEQ_CST but doesn't support the GCC extension */
  20. -#if defined(HAVE_FUTEX) && defined(__ATOMIC_SEQ_CST) && !defined(__clang__)
  21. +#if defined(HAVE_FUTEX) && defined(__ATOMIC_SEQ_CST) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) && !defined(__clang__)
  22. #define USE_NATIVE_MUTEX
  23. #endif
  24. --
  25. 2.9.4