From 34dbbb65fdfa4a70cd2c472731bb71b16385e29f Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 28 Aug 2014 17:44:09 +0000 Subject: [PATCH] Make atomics extern "C" again. Pawel changed the implementation but I see no reason to make those available only from C++, so it must be an oversight. Fixes building Haiku on Haiku which otherwise hits a mismatch in build compatibility headers. --- headers/os/support/SupportDefs.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/headers/os/support/SupportDefs.h b/headers/os/support/SupportDefs.h index 7e47018178..476d42c0ba 100644 --- a/headers/os/support/SupportDefs.h +++ b/headers/os/support/SupportDefs.h @@ -217,6 +217,9 @@ extern void* get_stack_frame(void); #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) +#ifdef __cplusplus +extern "C" { +#endif static inline void atomic_set(int32* value, int32 newValue) @@ -319,6 +322,10 @@ atomic_get64(int64* value) return __atomic_load_n(value, __ATOMIC_ACQUIRE); } +#ifdef __cplusplus +} +#endif + #else // __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)