]> git.sesse.net Git - vlc/commitdiff
vlc_atomic: work-around clang issue #11174
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 11 Nov 2012 14:16:45 +0000 (15:16 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sun, 11 Nov 2012 14:25:40 +0000 (15:25 +0100)
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_ is neither defined nor is an equivalent macro available. However, the protected features are supported.

include/vlc_atomic.h

index 1a05d45f7c9136218bbc1453c402c7596460646d..5388aa9ebcf5178b2a3ed24c9bdd904c54fc6bd0 100644 (file)
@@ -32,7 +32,7 @@
 /*** Native C11 atomics ***/
 #  include <stdatomic.h>
 
-# elif defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
+# elif defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) || (defined (__clang__) && (defined (__x86_64__) || defined (__i386__)))
 
 /*** Intel/GCC atomics ***/