summaryrefslogtreecommitdiffstats
path: root/contrib/compiler-rt/lib/builtins/atomic_flag_clear.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/compiler-rt/lib/builtins/atomic_flag_clear.c')
-rw-r--r--contrib/compiler-rt/lib/builtins/atomic_flag_clear.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/compiler-rt/lib/builtins/atomic_flag_clear.c b/contrib/compiler-rt/lib/builtins/atomic_flag_clear.c
index 15984cd..da912af 100644
--- a/contrib/compiler-rt/lib/builtins/atomic_flag_clear.c
+++ b/contrib/compiler-rt/lib/builtins/atomic_flag_clear.c
@@ -12,8 +12,16 @@
*===------------------------------------------------------------------------===
*/
+#ifndef __has_include
+#define __has_include(inc) 0
+#endif
+
+#if __has_include(<stdatomic.h>)
+
#include <stdatomic.h>
#undef atomic_flag_clear
void atomic_flag_clear(volatile atomic_flag *object) {
- return __c11_atomic_store(&(object)->_Value, 0, __ATOMIC_SEQ_CST);
+ __c11_atomic_store(&(object)->_Value, 0, __ATOMIC_SEQ_CST);
}
+
+#endif
OpenPOWER on IntegriCloud