diff --git a/src/common/compat.h b/src/common/compat.h index e4430c6a51..8511cb2cdf 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -90,7 +90,7 @@ extern INLINE double U64_TO_DBL(uint64_t x) { #endif /* GCC has several useful attributes. */ -#ifdef __GNUC__ +#ifdef __GNUC__ && __GNUC_MAJOR__ >= 3 #define ATTR_NORETURN __attribute__((noreturn)) #define ATTR_PURE __attribute__((pure)) #define ATTR_MALLOC __attribute__((malloc))