diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index c7e12d58c1f53..6546ebfb5b790 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -336,9 +336,12 @@ char *alloca(); # define ZEND_PRESERVE_NONE __attribute__((preserve_none)) #endif -#if __has_attribute(musttail) -# define HAVE_MUSTTAIL -# define ZEND_MUSTTAIL __attribute__((musttail)) + +#if !defined(__apple_build_version__) || (defined(__apple_build_version__) && __apple_build_version__ >= 17000404) +# if __has_attribute(musttail) +# define HAVE_MUSTTAIL +# define ZEND_MUSTTAIL __attribute__((musttail)) +# endif #endif #if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(__APPLE__) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)) || __has_attribute(noreturn)