Compare commits

...

6 Commits

11 changed files with 247 additions and 120 deletions

4
.gitignore vendored
View File

@@ -1,9 +1,13 @@
# - common
*.log
*.swp
*.bz2
conf/*.conf
/BAK/*
php-*
log_*
!php-5.6-libssl-1.1*
# Aber Patch-Dateien erlauben
!php-*.patch

View File

@@ -557,114 +557,54 @@ IFS='.' read -r major minor patch <<< "$VERSION"
declare -i PHP_VERSION_NUM=$((10#$major * 10000 + 10#$minor * 100 + 10#$patch))
declare -i PHP_MAIN_VERSION_NUM=$((10#$major * 10000 + 10#$minor * 100))
# version helper scripts
#
# =============================
# Version Helper Funktionen
# =============================
# ----------------------------
# Vollversion → numerische Zahl
# ----------------------------
version_to_number() {
local a b c
IFS='.' read -r a b c <<< "$1"
echo $((10#$a * 10000 + 10#$b * 100 + 10#${c:-0}))
local ver=${1:-$VERSION}
local a b c
IFS='.' read -r a b c <<< "$ver"
echo $((10#$a * 10000 + 10#$b * 100 + 10#${c:-0}))
}
version_eq() {
local v1=$(version_to_number "$1")
local v2=$(version_to_number "$2")
(( v1 == v2 ))
}
# Vergleichsfunktionen für volle Versionen
version_eq() { local ref=$1; (( $(version_to_number "$VERSION") == $(version_to_number "$ref") )); }
version_lt() { local ref=$1; (( $(version_to_number "$VERSION") < $(version_to_number "$ref") )); }
version_le() { local ref=$1; (( $(version_to_number "$VERSION") <= $(version_to_number "$ref") )); }
version_gt() { local ref=$1; (( $(version_to_number "$VERSION") > $(version_to_number "$ref") )); }
version_ge() { local ref=$1; (( $(version_to_number "$VERSION") >= $(version_to_number "$ref") )); }
version_lt() {
local v1=$(version_to_number "$1")
local v2=$(version_to_number "$2")
(( v1 < v2 ))
}
version_num() { version_to_number "${1:-$VERSION}"; }
version_le() {
local v1=$(version_to_number "$1")
local v2=$(version_to_number "$2")
(( v1 <= v2 ))
}
version_gt() {
local v1=$(version_to_number "$1")
local v2=$(version_to_number "$2")
(( v1 > v2 ))
}
version_ge() {
local v1=$(version_to_number "$1")
local v2=$(version_to_number "$2")
(( v1 >= v2 ))
}
main_version_eq() {
local a b x y
IFS='.' read -r a b _ <<< "$1"
IFS='.' read -r x y _ <<< "$2"
local v1=$((10#$a * 100 + 10#$b))
local v2=$((10#$x * 100 + 10#$y))
(( v1 == v2 ))
}
main_version_lt() {
local a b x y
IFS='.' read -r a b _ <<< "$1"
IFS='.' read -r x y _ <<< "$2"
local v1=$((10#$a * 100 + 10#$b))
local v2=$((10#$x * 100 + 10#$y))
(( v1 < v2 ))
}
main_version_le() {
local a b x y
IFS='.' read -r a b _ <<< "$1"
IFS='.' read -r x y _ <<< "$2"
local v1=$((10#$a * 100 + 10#$b))
local v2=$((10#$x * 100 + 10#$y))
(( v1 <= v2 ))
}
main_version_gt() {
local a b x y
IFS='.' read -r a b _ <<< "$1"
IFS='.' read -r x y _ <<< "$2"
local v1=$((10#$a * 100 + 10#$b))
local v2=$((10#$x * 100 + 10#$y))
(( v1 > v2 ))
}
main_version_ge() {
local a b x y
IFS='.' read -r a b _ <<< "$1"
IFS='.' read -r x y _ <<< "$2"
local v1=$((10#$a * 100 + 10#$b))
local v2=$((10#$x * 100 + 10#$y))
(( v1 <= v2 ))
}
# --- Hauptversion in numerischer Form (Major*100 + Minor)
main_version_num() {
local a b
IFS='.' read -r a b _ <<< "$1"
# ----------------------------
# Main-Versionnumerische Zahl (Major*100 + Minor)
# ----------------------------
main_version_to_number() {
local ver=${1:-$PHP_MAIN_VERSION}
IFS='.' read -r a b _ <<< "$ver"
echo $((10#$a * 100 + 10#$b))
}
# --- Vollständige Version in numerischer Form (Major*10000 + Minor*100 + Patch)
version_num() {
version_to_number "$1"
}
# Vergleichsfunktionen für Main-Versionen
main_version_eq() { local ref=$1; (( $(main_version_to_number "$PHP_MAIN_VERSION") == $(main_version_to_number "$ref") )); }
main_version_lt() { local ref=$1; (( $(main_version_to_number "$PHP_MAIN_VERSION") < $(main_version_to_number "$ref") )); }
main_version_le() { local ref=$1; (( $(main_version_to_number "$PHP_MAIN_VERSION") <= $(main_version_to_number "$ref") )); }
main_version_gt() { local ref=$1; (( $(main_version_to_number "$PHP_MAIN_VERSION") > $(main_version_to_number "$ref") )); }
main_version_ge() { local ref=$1; (( $(main_version_to_number "$PHP_MAIN_VERSION") >= $(main_version_to_number "$ref") )); }
main_version_num() { main_version_to_number "${1:-$PHP_MAIN_VERSION}"; }
# Since version 7.4 package 'libsqlite3-dev' is needed
# Since version 7.4 package 'libonig-dev' is needed
#
#if (( PHP_MAIN_VERSION_NUM >= 70400 )); then
if version_ge "$VERSION" "7.4.0"; then
if version_ge "7.4.0"; then
needed_debian_packages="$needed_debian_packages
libsqlite3-dev
libonig-dev"
@@ -673,18 +613,18 @@ fi
# - A hack, because configure don't work with systemd on version 5.4.x
## -
#if (( PHP_MAIN_VERSION_NUM == 50400 )) ; then
if main_version_eq "${VERSION}" "5.4"; then
if main_version_eq "5.4"; then
SYSTEMD_EXISTS=false
fi
## - Let make use multiple cores (-j<number of cores +1>)
## -
if ! main_version_eq "$VERSION" "5.4"; then
if ! main_version_eq "5.4"; then
export MAKEFLAGS=-j$(expr `grep "^processor" /proc/cpuinfo | sort -u | wc -l` + 1)
else
unset MAKEFLAGS
fi
if main_version_eq "$VERSION" "5.6" &&
if main_version_eq "5.6" &&
(( os_version >= 13 )) &&
[[ "$os_dist" == "debian" ]] ; then
@@ -701,7 +641,7 @@ if main_version_eq "$VERSION" "5.6" &&
\t cyrus-sasl compiled against openssl 1.1
\t openldap compiled against cyrus-sasl"
elif main_version_eq "$VERSION" "5.6" &&
elif main_version_eq "5.6" &&
(( os_version >= 12 )) &&
[[ "$os_dist" == "debian" ]] ; then
@@ -712,7 +652,7 @@ elif main_version_eq "$VERSION" "5.6" &&
\t icu4c (libicu)
\t openssl v 1.1.1"
elif main_version_eq "$VERSION" "5.6" &&
elif main_version_eq "5.6" &&
(( os_version >= 10 )) &&
[[ "$os_dist" == "debian" ]] ; then
@@ -6067,7 +6007,7 @@ fi
_patch_file="php-5.6-zlib-1.2.11.patch"
echononl "\tApply ${_patch_file}"
if main_version_le "$VERSION" "7.3" && (( os_version >= 13 )); then
if main_version_le "7.3" && (( os_version >= 13 )); then
if [[ -f "${_srcdir}/${_patch_file}" ]] ; then
patch -d $_builddir -p0 < ${_srcdir}/${_patch_file} > $tmp_err_msg 2>&1
if [[ $? -eq 0 ]]; then
@@ -6108,7 +6048,7 @@ fi
_patch_file="php-5.6-libmagic.patch"
echononl "\tApply ${_patch_file}"
if main_version_le "$VERSION" "7.3" && (( os_version >= 13 )); then
if main_version_le "7.3" && (( os_version >= 13 )); then
if [[ -f "${_srcdir}/${_patch_file}" ]] ; then
patch -d $_builddir -p0 < ${_srcdir}/${_patch_file} > $tmp_err_msg 2>&1
if [[ $? -eq 0 ]]; then
@@ -6149,7 +6089,7 @@ fi
_patch_file="php-5.6-mbfl_encoding.patch"
echononl "\tApply ${_patch_file}"
if main_version_le "$VERSION" "7.3" && (( os_version >= 13 )); then
if main_version_le "7.3" && (( os_version >= 13 )); then
if [[ -f "${_srcdir}/${_patch_file}" ]] ; then
patch -d $_builddir -p0 < ${_srcdir}/${_patch_file} > $tmp_err_msg 2>&1
if [[ $? -eq 0 ]]; then
@@ -6190,7 +6130,7 @@ fi
_patch_file="php-5.6-mbfl_put_invalid_char.patch"
echononl "\tApply ${_patch_file}"
if main_version_le "$VERSION" "7.3" && (( os_version >= 13 )); then
if main_version_le "7.3" && (( os_version >= 13 )); then
if [[ -f "${_srcdir}/${_patch_file}" ]] ; then
patch -d $_builddir -p0 < ${_srcdir}/${_patch_file} > $tmp_err_msg 2>&1
if [[ $? -eq 0 ]]; then
@@ -6231,7 +6171,7 @@ fi
_patch_file="php-5.6-session.patch"
echononl "\tApply ${_patch_file}"
if main_version_le "$VERSION" "7.3" && (( os_version >= 13 )); then
if main_version_le "7.3" && (( os_version >= 13 )); then
if [[ -f "${_srcdir}/${_patch_file}" ]] ; then
patch -d $_builddir -p0 < ${_srcdir}/${_patch_file} > $tmp_err_msg 2>&1
if [[ $? -eq 0 ]]; then
@@ -6272,7 +6212,7 @@ fi
_patch_file="php-5.6-wddx.patch"
echononl "\tApply ${_patch_file}"
if main_version_le "$VERSION" "7.3" && (( os_version >= 13 )); then
if main_version_le "7.3" && (( os_version >= 13 )); then
if [[ -f "${_srcdir}/${_patch_file}" ]] ; then
patch -d $_builddir -p0 < ${_srcdir}/${_patch_file} > $tmp_err_msg 2>&1
if [[ $? -eq 0 ]]; then
@@ -6313,7 +6253,7 @@ fi
_patch_file="php-5.6-mkstemp.patch"
echononl "\tApply ${_patch_file}"
if main_version_le "$VERSION" "7.3" && (( os_version >= 13 )); then
if main_version_le "7.3" && (( os_version >= 13 )); then
if [[ -f "${_srcdir}/${_patch_file}" ]] ; then
patch -d $_builddir -p0 < ${_srcdir}/${_patch_file} > $tmp_err_msg 2>&1
if [[ $? -eq 0 ]]; then
@@ -6354,7 +6294,7 @@ fi
_patch_file="php-5.6-reentrancy.patch"
echononl "\tApply ${_patch_file}"
if main_version_le "$VERSION" "7.3" && (( os_version >= 13 )); then
if main_version_le "7.3" && (( os_version >= 13 )); then
if [[ -f "${_srcdir}/${_patch_file}" ]] ; then
patch -d $_builddir -p0 < ${_srcdir}/${_patch_file} > $tmp_err_msg 2>&1
if [[ $? -eq 0 ]]; then
@@ -6395,7 +6335,7 @@ fi
_patch_file="php-5.6-cast.patch"
echononl "\tApply ${_patch_file}"
if main_version_le "$VERSION" "7.3" && (( os_version >= 13 )); then
if main_version_le "7.3" && (( os_version >= 13 )); then
if [[ -f "${_srcdir}/${_patch_file}" ]] ; then
patch -d $_builddir -p0 < ${_srcdir}/${_patch_file} > $tmp_err_msg 2>&1
if [[ $? -eq 0 ]]; then
@@ -6449,8 +6389,6 @@ if ! $WITHOUT_APACHE_MOD_PHP ; then
fi
cd $_builddir || exit 1
echononl "\tGoing to configure.."
# : ${_arch:=i686}
# : ${_arch:=athlon}
# : ${_arch:=k8} ## --> x86-64 instructionset
@@ -6465,7 +6403,7 @@ echononl "\tGoing to configure.."
## CPP="/usr/bin/cpp-3.4" \
## CFLAGS="$_cflags" LDFLAGS="-s" \
#if main_version_le "$VERSION" "7.3" && (( os_version >= 13 )); then
#if main_version_le "7.3" && (( os_version >= 13 )); then
# export CFLAGS="-O2 -fno-strict-aliasing -Wno-error=incompatible-pointer-types"
#fi
if $_install_openldap ; then
@@ -6475,6 +6413,32 @@ if $_install_openldap ; then
-L/usr/local/cyrus-sasl/lib -Wl,-rpath,/usr/local/cyrus-sasl/lib \
-L/usr/local/openssl/lib -Wl,-rpath,/usr/local/openssl/lib"
fi
if main_version_eq "7.4" ; then
export CXXFLAGS="-O2 -pipe -std=gnu++17"
export CFLAGS="-O2 -pipe"
fi
if main_version_eq "8.0" ; then
# cp -a build/php_cxx_compile_stdcxx.m4 build/php_cxx_compile_stdcxx.m4.ORIG
#
#sed -i 's/-std=c++11/-std=gnu++17/g' build/php_cxx_compile_stdcxx.m4
#sed -i 's/-std=gnu++11/-std=gnu++17/g' build/php_cxx_compile_stdcxx.m4
#sed -i 's/-std=c++14/-std=gnu++17/g' build/php_cxx_compile_stdcxx.m4
#sed -i 's/-std=gnu++14/-std=gnu++17/g' build/php_cxx_compile_stdcxx.m4
#sed -i 's/-std=c++0x/-std=gnu++17/g' build/php_cxx_compile_stdcxx.m4
#
# #sed -i 's/std=c++11/std=gnu++17/g' build/php_cxx_compile_stdcxx.m4
# #sed -i 's/std=gnu++11/std=gnu++17/g' build/php_cxx_compile_stdcxx.m4
# #sed -i 's/std=c++0x/std=gnu++17/g' build/php_cxx_compile_stdcxx.m4
# echo ""
# ./buildconf --force
# echo ""
# echo ""
#
export CC=gcc
export CXX=g++
export CXXFLAGS="-O2 -pipe -std=gnu++17"
export ICU_CXXFLAGS="-std=gnu++17"
fi
config_params="
--prefix=$PREFIX_PHP
@@ -6551,7 +6515,7 @@ else
--with-curl"
fi
if main_version_le "$VERSION" "7.3" && (( os_version >= 13 )); then
if main_version_le "7.3" && (( os_version >= 13 )); then
if $_install_openldap ; then
config_params="${config_params}
--with-ldap"
@@ -6565,9 +6529,29 @@ fi
#if ([[ "$PHP_MAJOR_VERSION" -eq 8 ]] && [[ "$PHP_MINOR_VERSION" -lt 4 ]]) \
# || [[ "$PHP_MAJOR_VERSION" -lt 8 ]] ; then
if [[ "$os_dist" = "debian" ]] && [[ "$os_version" -lt 13 ]] \
&& ( [[ "$PHP_MAJOR_VERSION" -lt 8 ]] \
|| ( [[ "$PHP_MAJOR_VERSION" -eq 8 ]] && [[ "$PHP_MINOR_VERSION" -lt 4 ]] ) ) ; then
#if [[ "$os_dist" = "debian" ]] && [[ "$os_version" -lt 13 ]] \
# && ( [[ "$PHP_MAJOR_VERSION" -lt 8 ]] \
# || ( [[ "$PHP_MAJOR_VERSION" -eq 8 ]] && [[ "$PHP_MINOR_VERSION" -lt 4 ]] ) ) ; then
#
# config_params="$config_params
# --with-imap
# --with-imap-ssl
#"
#fi
#if [[ "$os_family" == "debian" ]] && (( os_version < 13 )) && main_version_lt "8.4"; then
#
# config_params="$config_params
# --with-imap
# --with-imap-ssl
#"
#fi
if main_version_le "8.3" && \
( dpkg -s libc-client-dev >/dev/null 2>&1 \
|| dpkg -s libc-client2007e-dev >/dev/null 2>&1 \
|| dpkg -s libc-client2007f-dev >/dev/null 2>&1 \
|| dpkg -s uw-imap-dev >/dev/null 2>&1 ); then
config_params="$config_params
--with-imap
@@ -6703,6 +6687,9 @@ if $WITH_PHP_FPM_SUPPORT ; then
config_params="$config_params --enable-fpm"
fi
echononl "\tGoing to configure.."
echo "LDFLAGS=\"-s\" ./configure $config_params" > ${_logdir}/php-configure.log
echo "" >> ${_logdir}/php-configure.log
@@ -6926,7 +6913,7 @@ if [ -f /etc/manpath.config ];then
echo "MANPATH_MAP /usr/local/php/bin /usr/local/php/php/man" >> /etc/manpath.config
echo "MANDB_MAP /usr/local/php/php/man /var/cache/man" >> /etc/manpath.config
fi
elif [ -f /etc/man.conf];then
elif [ -f /etc/man.conf ]; then
if ! grep /opt/php/man /etc/man.conf > /dev/null 2<&1 ; then
echo >> /etc/man.conf
echo "MANPATH /opt/php/man /var/cache/man" >> /etc/man.conf
@@ -9454,9 +9441,9 @@ echo "" >> ${_logdir}/pecl_install.log
echononl "\tInstall 'imap' via pecl.."
if ([[ "$PHP_MAJOR_VERSION" -eq 8 ]] && [[ "$PHP_MINOR_VERSION" -ge 4 ]]) \
|| [[ "$PHP_MAJOR_VERSION" -gt 8 ]] \
|| ([[ "$os_dist" = "debian" ]] && [[ "$os_version" -ge 13 ]]) ; then
#if main_version_ge "8.3" && \
# ( main_version_ge "8.4" || ([[ "$os_family" == "debian" ]] && (( os_version >= 13 ))) ); then
if main_version_ge "8.4" ; then
if dpkg -s libc-client-dev > /dev/null 2>&1 \
|| dpkg -s libc-client2007e-dev > /dev/null 2>&1 \
@@ -9465,7 +9452,7 @@ if ([[ "$PHP_MAJOR_VERSION" -eq 8 ]] && [[ "$PHP_MINOR_VERSION" -ge 4 ]]) \
export CPPFLAGS="-I/usr/include"
export LDFLAGS="-L/usr/lib"
printf "no\nyes\n" | pecl install imap >> "${_logdir}/pecl_install.log" 2>&1
printf "no\nyes\n" | ${PREFIX_PHP}/bin/pecl install imap >> "${_logdir}/pecl_install.log" 2>&1
if [ "$?" = "0" ]; then
echo_ok
@@ -10986,6 +10973,10 @@ if [[ -n "$zend_extension_opcache" ]];then
echo_failed
fi
fi
if [[ -n "$zend_extension_opcache" ]] || main_version_ge "8.5" ; then
## - set opcache.error_log="/var/log/apache2/
## -
echononl "\tphp.ini: opcache.error_log = /var/log/apache2/opcache_errors.log"

21
php-5.6-cast.patch Normal file
View File

@@ -0,0 +1,21 @@
--- main/streams/cast.c.bak 2026-03-03 21:01:49.742036485 +0100
+++ main/streams/cast.c 2026-03-03 21:10:36.519494693 +0100
@@ -122,11 +122,16 @@
return 0;
}
# else
-static int stream_cookie_seeker(void *cookie, off_t position, int whence)
+static int stream_cookie_seeker(void *cookie, __off64_t *position, int whence)
{
TSRMLS_FETCH();
- return php_stream_seek((php_stream *)cookie, position, whence);
+ *position = php_stream_seek((php_stream *)cookie, (off_t)*position, whence);
+
+ if (*position == -1) {
+ return -1;
+ }
+ return 0;
}
# endif

10
php-5.6-libmagic.patch Normal file
View File

@@ -0,0 +1,10 @@
--- ext/fileinfo/libmagic/funcs.c.bak 2019-01-09 10:54:13.000000000 +0100
+++ ext/fileinfo/libmagic/funcs.c 2026-03-03 18:05:18.222386324 +0100
@@ -437,6 +437,7 @@
return ms->o.buf == NULL ? 0 : strlen(ms->o.buf);
}
+protected int
file_replace(struct magic_set *ms, const char *pat, const char *rep)
{
zval *patt;

View File

@@ -0,0 +1,11 @@
--- ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c.bak 2026-03-03 18:35:51.943832964 +0100
+++ ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c 2026-03-03 18:36:08.663776701 +0100
@@ -48,7 +48,7 @@
mbfl_no_encoding_2022jp_kddi,
"ISO-2022-JP-MOBILE#KDDI",
"ISO-2022-JP",
- mbfl_encoding_2022jp_kddi_aliases,
+ &mbfl_encoding_2022jp_kddi_aliases,
NULL,
MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE | MBFL_ENCTYPE_GL_UNSAFE
};

View File

@@ -0,0 +1,11 @@
--- ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c.bak 2019-01-09 10:54:13.000000000 +0100
+++ ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c 2026-03-03 18:51:24.912344206 +0100
@@ -36,6 +36,8 @@
#include "mbfilter_utf8_mobile.h"
#include "mbfilter_sjis_mobile.h"
+int mbfl_filt_put_invalid_char(int c, mbfl_convert_filter *filter);
+
extern int mbfl_filt_ident_utf8(int c, mbfl_identify_filter *filter);
extern int mbfl_filt_conv_utf8_wchar_flush(mbfl_convert_filter *filter);

10
php-5.6-mkstemp.patch Normal file
View File

@@ -0,0 +1,10 @@
--- ext/zip/lib/mkstemp.c.bak 2019-01-09 10:54:13.000000000 +0100
+++ ext/zip/lib/mkstemp.c 2026-03-03 19:48:02.521698567 +0100
@@ -43,6 +43,7 @@
#endif
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#ifndef O_BINARY
#define O_BINARY 0

11
php-5.6-reentrancy.patch Normal file
View File

@@ -0,0 +1,11 @@
--- main/reentrancy.c.bak 2026-03-03 20:45:56.822721495 +0100
+++ main/reentrancy.c 2026-03-03 20:46:22.066607624 +0100
@@ -136,7 +136,7 @@
(HPUX returns 0 on success whereas Solaris returns non-zero)
*/
entry->d_name[0] = '\0';
- readdir_r(dirp, entry);
+ readdir_r(dirp, entry, result);
if (entry->d_name[0] == '\0') {
*result = NULL;

20
php-5.6-session.patch Normal file
View File

@@ -0,0 +1,20 @@
--- ext/session/session.c.bak 2019-01-09 10:54:13.000000000 +0100
+++ ext/session/session.c 2026-03-03 19:11:58.987141885 +0100
@@ -859,12 +859,16 @@
PS_SERIALIZER_DECODE_FUNC(php_serialize) /* {{{ */
{
const char *endptr = val + vallen;
+ const unsigned char *p;
+ const unsigned char *max;
zval *session_vars;
php_unserialize_data_t var_hash;
PHP_VAR_UNSERIALIZE_INIT(var_hash);
ALLOC_INIT_ZVAL(session_vars);
- if (php_var_unserialize(&session_vars, &val, endptr, &var_hash TSRMLS_CC)) {
+ p = (const unsigned char *) val;
+ max = (const unsigned char *) endptr;
+ if (php_var_unserialize(&session_vars, &p, max, &var_hash TSRMLS_CC)) {
var_push_dtor(&var_hash, &session_vars);
}

11
php-5.6-wddx.patch Normal file
View File

@@ -0,0 +1,11 @@
--- ext/wddx/wddx.c.bak 2026-03-03 19:30:38.762247898 +0100
+++ ext/wddx/wddx.c 2026-03-03 19:26:11.139426331 +0100
@@ -467,7 +467,7 @@
/* OBJECTS_FIXME */
zval **ent, *fname, **varname;
zval *retval = NULL;
- const char *key;
+ char *key;
ulong idx;
char tmp_buf[WDDX_BUF_LEN];
HashTable *objhash, *sleephash;

27
php-5.6-zlib-1.2.11.patch Normal file
View File

@@ -0,0 +1,27 @@
--- ext/zlib/zlib.c.bak 2019-01-09 10:54:13.000000000 +0100
+++ ext/zlib/zlib.c 2026-03-03 17:34:11.078246063 +0100
@@ -1013,10 +1013,12 @@
/* }}} */
/* {{{ ZEND_MODULE_GLOBALS_CTOR */
-static ZEND_MODULE_GLOBALS_CTOR_D(zlib)
+static void php_zlib_globals_ctor(void *zlib_globals)
{
- zlib_globals->ob_gzhandler = NULL;
- zlib_globals->handler_registered = 0;
+ zend_zlib_globals *g = (zend_zlib_globals *) zlib_globals;
+
+ g->ob_gzhandler = NULL;
+ g->handler_registered = 0;
}
/* }}} */
@@ -1032,7 +1034,7 @@
PHP_MINFO(zlib),
"2.0",
PHP_MODULE_GLOBALS(zlib),
- ZEND_MODULE_GLOBALS_CTOR_N(zlib),
+ php_zlib_globals_ctor,
NULL,
NULL,
STANDARD_MODULE_PROPERTIES_EX