Commit 45495aa4 authored by Felix Paul Kühne's avatar Felix Paul Kühne

atomics: fix compilation with clang version < 7

parent 1f5567b3
...@@ -26,6 +26,11 @@ ...@@ -26,6 +26,11 @@
* Atomic operations do not require locking, but they are not very powerful. * Atomic operations do not require locking, but they are not very powerful.
*/ */
/* clang version < 7 lacks the header but supports atomics - work-around */
#if __clang__ && __clang_major__ >= 4 && !__has_include(<stdatomic.h>)
#define __STDC_NO_ATOMICS__ 1
#endif
# ifndef __cplusplus # ifndef __cplusplus
# if (__STDC_VERSION__ >= 201112L) && !defined (__STDC_NO_ATOMICS__) # if (__STDC_VERSION__ >= 201112L) && !defined (__STDC_NO_ATOMICS__)
/*** Native C11 atomics ***/ /*** Native C11 atomics ***/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment