summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index e2321c3394..34c06a8941 100644
--- a/gc.c
+++ b/gc.c
@@ -31,8 +31,12 @@
#include <sys/types.h>
#include <assert.h>
-#if /* is ASAN enabled? */ defined(__has_feature) ? \
- __has_feature(address_sanitizer) /* Clang */ : \
+#ifndef __has_feature
+# define __has_feature(x) 0
+#endif
+
+#if /* is ASAN enabled? */ \
+ __has_feature(address_sanitizer) /* Clang */ || \
defined(__SANITIZE_ADDRESS__) /* GCC 4.8.x */
#define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \
__attribute__((no_address_safety_analysis)) \