mirror of
https://github.com/shivammathur/setup-php.git
synced 2026-11-20 20:41:56 +00:00
Fix CUBRID source builds with current CMake and compilers
This commit is contained in:
@@ -31,7 +31,7 @@ add_cubrid_helper() {
|
||||
set_cubrid_repo
|
||||
set_cubrid_branch
|
||||
patch_phpize
|
||||
read -r "${ext}_PREFIX_CONFIGURE_OPTS" <<< "CFLAGS=-Wno-implicit-function-declaration"
|
||||
read -r "${ext}_CONFIGURE_PREFIX_OPTS" <<< "SED=sed CMAKE_POLICY_VERSION_MINIMUM=3.5 CFLAGS=-std=gnu17"
|
||||
read -r "${ext}_CONFIGURE_OPTS" <<< "--with-php-config=$(command -v php-config)"
|
||||
add_extension_from_source "$ext" https://github.com CUBRID "$cubrid_repo" "$cubrid_branch" extension
|
||||
restore_phpize
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
patch_pdo_cubrid() {
|
||||
if [[ ${version:?} =~ ^7\.[0-2]$ ]] && [ -f cubrid_driver7.c ]; then
|
||||
# Match the PHP 7 PDO callbacks and store zvals with the PHP 7 hash API.
|
||||
sed -i.bak \
|
||||
-e 's/const char \*sql, long sql_len/const char *sql, size_t sql_len/g' \
|
||||
-e 's/static long cubrid_handle_doer/static zend_long cubrid_handle_doer/' \
|
||||
-e 's/zend_hash_index_update_ptr(HASH_OF(arg), index, (void \*)\&tmp_zval)/zend_hash_index_update(HASH_OF(arg), index, \&tmp_zval)/' \
|
||||
-e 's/(cubrid_retval = zend_hash_update(HASH_OF(arg), key, (void \*) \&tmp_zval)) == FAILURE/zend_hash_str_update(HASH_OF(arg), key, strlen(key), \&tmp_zval) == NULL/' \
|
||||
cubrid_driver7.c
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user