[vlc-commits] atomics: fix compilation with GCC

Felix Paul Kühne git at videolan.org
Fri Jun 26 17:04:12 CEST 2015


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Jun 26 17:03:54 2015 +0200| [569df08d1be561022b86ce9c58dece388532e818] | committer: Felix Paul Kühne

atomics: fix compilation with GCC

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=569df08d1be561022b86ce9c58dece388532e818
---

 include/vlc_atomic.h |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/vlc_atomic.h b/include/vlc_atomic.h
index b69c88f..00dd673 100644
--- a/include/vlc_atomic.h
+++ b/include/vlc_atomic.h
@@ -27,9 +27,11 @@
  */
 
 /* clang version < 7 lacks the header but supports atomics - work-around */
-#if __clang__ && __clang_major__ >= 4 && !__has_include(<stdatomic.h>)
+#if defined(__clang__)
+#if __clang_major__ >= 4 && !__has_include(<stdatomic.h>)
 #define __STDC_NO_ATOMICS__ 1
 #endif
+#endif
 
 # ifndef __cplusplus
 #  if (__STDC_VERSION__ >= 201112L) && !defined (__STDC_NO_ATOMICS__)



More information about the vlc-commits mailing list