From 5febd633b97fc6399368d36df639c8b5f218f0c8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 22 Jul 2020 18:26:40 +0200 Subject: [PATCH] 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. --- ext/pdo/php_pdo_driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.50.1