diff --git a/src/stdafx.h b/src/stdafx.h index 9e2eb2aef8..7d5a8754f6 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -136,8 +136,12 @@ # endif #endif /* __GNUC__ || __clang__ */ -#if defined(__GNUC__) -# define NOACCESS(args) __attribute__ ((access (none, args))) +#if defined __has_attribute +# if __has_attribute (access) +# define NOACCESS(args) __attribute__ ((access (none, args))) +# else +# define NOACCESS(args) +# endif #else # define NOACCESS(args) #endif