This is an automated email from the ASF dual-hosted git repository.
dkulp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/master by this push:
new 4d07366 avro-c: Fix build with clang compiler
4d07366 is described below
commit 4d07366aae24b6701c304dd5124b7c5bae5ea6ab
Author: Khem Raj <[email protected]>
AuthorDate: Mon Apr 10 09:15:04 2017 -0700
avro-c: Fix build with clang compiler
Clang advertizes itself to be compatible with gcc 4.2.1
while that was true several years ago, it now supports
a lot more newer features, the test to just check gcc
version should be supplanted with clang check as well
so atomic support in clang can be asserted as well
Fixes
lang/c/src/avro/refcount.h:301:2: error: "No atomic implementation!"
Signed-off-by: Khem Raj <[email protected]>
---
lang/c/src/avro/refcount.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lang/c/src/avro/refcount.h b/lang/c/src/avro/refcount.h
index 69afa4f..d76ba05 100644
--- a/lang/c/src/avro/refcount.h
+++ b/lang/c/src/avro/refcount.h
@@ -118,7 +118,8 @@ avro_refcount_dec(volatile int *refcount)
* GCC intrinsics
*/
-#elif (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40500
+#elif (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40500 \
+|| defined(__clang__)
static inline void
avro_refcount_set(volatile int *refcount, int value)