aboutsummaryrefslogtreecommitdiff
path: root/lib/builtins/atomic_flag_clear.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/builtins/atomic_flag_clear.c')
-rw-r--r--lib/builtins/atomic_flag_clear.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/builtins/atomic_flag_clear.c b/lib/builtins/atomic_flag_clear.c
index 15984cd5267d..da912af64312 100644
--- a/lib/builtins/atomic_flag_clear.c
+++ b/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