diff options
author | Joe Watkins <krakjoe@php.net> | 2019-06-12 15:10:49 +0200 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2019-06-12 15:10:49 +0200 |
commit | e1f65e2d97030d95fe5d31e2589a684c2220143e (patch) | |
tree | f957c669ad5f0aeccf924a79ac192285f55b3322 | |
parent | 3b6d36435f5616e4028720fbf71b1ecce1c9417b (diff) | |
parent | 6fcb469991248b3f67f618ed7033465197ccfcda (diff) | |
download | php-git-e1f65e2d97030d95fe5d31e2589a684c2220143e.tar.gz |
Merge branch 'PHP-7.4' of git://github.com/php/php-src into PHP-7.4
-rw-r--r-- | Zend/zend_portability.h | 8 | ||||
-rw-r--r-- | ext/standard/php_dns.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 009be97d96..aae08a49c1 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -217,8 +217,13 @@ char *alloca(); # define ZEND_ATTRIBUTE_DEPRECATED #endif -#if defined(__GNUC__) && ZEND_GCC_VERSION >= 4003 +#if ZEND_GCC_VERSION >= 4003 || __has_attribute(unused) # define ZEND_ATTRIBUTE_UNUSED __attribute__((unused)) +#else +# define ZEND_ATTRIBUTE_UNUSED +#endif + +#if defined(__GNUC__) && ZEND_GCC_VERSION >= 4003 # define ZEND_COLD __attribute__((cold)) # define ZEND_HOT __attribute__((hot)) # ifdef __OPTIMIZE__ @@ -229,7 +234,6 @@ char *alloca(); # define ZEND_OPT_SPEED # endif #else -# define ZEND_ATTRIBUTE_UNUSED # define ZEND_COLD # define ZEND_HOT # define ZEND_OPT_SIZE diff --git a/ext/standard/php_dns.h b/ext/standard/php_dns.h index b6272a487b..47c1e3ab5d 100644 --- a/ext/standard/php_dns.h +++ b/ext/standard/php_dns.h @@ -23,7 +23,7 @@ #if defined(HAVE_DNS_SEARCH) #define php_dns_search(res, dname, class, type, answer, anslen) \ - ((int)dns_search(res, dname, class, type, answer, anslen, (struct sockaddr *)&from, &fromsize)) + ((int)dns_search(res, dname, class, type, (char *) answer, anslen, (struct sockaddr *)&from, &fromsize)) #define php_dns_free_handle(res) \ dns_free(res) |