[vlc-commits] Try fixing previous atomic header commit

Jean-Baptiste Kempf git at videolan.org
Tue Jun 30 23:13:26 CEST 2015


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Jun 30 23:12:49 2015 +0200| [5d26efcad8d1aa5023028e3caa5a608b5e1d81fe] | committer: Jean-Baptiste Kempf

Try fixing previous atomic header commit

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

 include/vlc_atomic.h |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/include/vlc_atomic.h b/include/vlc_atomic.h
index b90a797..ef0a1ee 100644
--- a/include/vlc_atomic.h
+++ b/include/vlc_atomic.h
@@ -26,9 +26,11 @@
  * Atomic operations do not require locking, but they are not very powerful.
  */
 
-/* Clang version < 7 lacks the stdatomic.h header but supports atomics */
-#if defined(__clang__) && __clang_major__ >= 4 && !__has_include(<stdatomic.h>)
-# define __STDC_NO_ATOMICS__ 1
+/* Clang older versions support atomics but lacks the stdatomic.h header */
+#if defined(__clang__)
+# if !defined(__has_include) || !__has_include(<stdatomic.h>)
+#  define __STDC_NO_ATOMICS__ 1
+# endif
 #endif
 
 # ifndef __cplusplus



More information about the vlc-commits mailing list