From: Nikita Popov Date: Wed, 22 Jul 2020 16:26:40 +0000 (+0200) Subject: Accept unsigned instead of enum pdo_attribute_type X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5febd633b97fc6399368d36df639c8b5f218f0c8;p=php Accept unsigned instead of enum pdo_attribute_type Driver-specific options get passed to these functions, which are not part of the pdo_attribute_type enum. Newer GCC versions don't like that. Accept a simple integr type instead. --- diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h index 2fd3b00e99..834b3b0bf7 100644 --- a/ext/pdo/php_pdo_driver.h +++ b/ext/pdo/php_pdo_driver.h @@ -199,7 +199,7 @@ enum pdo_null_handling { }; /* {{{ utils for reading attributes set as driver_options */ -static inline zend_long pdo_attr_lval(zval *options, enum pdo_attribute_type option_name, zend_long defval) +static inline zend_long pdo_attr_lval(zval *options, unsigned option_name, zend_long defval) { zval *v; @@ -208,7 +208,7 @@ static inline zend_long pdo_attr_lval(zval *options, enum pdo_attribute_type opt } return defval; } -static inline zend_string *pdo_attr_strval(zval *options, enum pdo_attribute_type option_name, zend_string *defval) +static inline zend_string *pdo_attr_strval(zval *options, unsigned option_name, zend_string *defval) { zval *v;