diff options
-rw-r--r-- | glib/gmacros.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/glib/gmacros.h b/glib/gmacros.h index 22edb2ef6..4570d2524 100644 --- a/glib/gmacros.h +++ b/glib/gmacros.h @@ -91,6 +91,10 @@ #endif /* Clang feature detection: http://clang.llvm.org/docs/LanguageExtensions.html */ +#ifndef __has_attribute +#define __has_attribute(x) 0 +#endif + #ifndef __has_feature #define __has_feature(x) 0 #endif @@ -100,7 +104,7 @@ #endif #if (!defined(__clang__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) || \ - (defined(__clang__) && __has_feature(__alloc_size__)) + (defined(__clang__) && __has_attribute(__alloc_size__)) #define G_GNUC_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) #define G_GNUC_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y))) #else |