diff --git a/headers/os/support/SupportDefs.h b/headers/os/support/SupportDefs.h index e1512360cf..db1ce576f0 100644 --- a/headers/os/support/SupportDefs.h +++ b/headers/os/support/SupportDefs.h @@ -250,7 +250,7 @@ extern void* get_stack_frame(void); /* Use the built-in atomic functions, if requested and available. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || defined(__clang__) static __inline__ void diff --git a/src/build/libroot/atomic.cpp b/src/build/libroot/atomic.cpp index 0e1fed4911..7520c35d27 100644 --- a/src/build/libroot/atomic.cpp +++ b/src/build/libroot/atomic.cpp @@ -6,7 +6,8 @@ #include -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) +#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7)) \ + && !defined(__clang__) void