From 456150599a71ef4f6c5036724683092b22c18937 Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Sat, 7 Nov 2015 23:02:53 +0100 Subject: [PATCH] Add __clang__ to a few #ifdefs --- headers/os/support/SupportDefs.h | 2 +- src/build/libroot/atomic.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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