diff --git a/src/SPC/store/SourcePatcher.php b/src/SPC/store/SourcePatcher.php index 4b37f2d9..1c05d274 100644 --- a/src/SPC/store/SourcePatcher.php +++ b/src/SPC/store/SourcePatcher.php @@ -414,14 +414,17 @@ class SourcePatcher if (preg_match('/PHP_VERSION_ID (\d+)/', $file, $match) !== 0) { $ver_id = intval($match[1]); if ($ver_id < 80000) { - return false; + self::patchFile('spc_fix_alpine_build_php80.patch', SOURCE_PATH . '/php-src'); + return true; } if ($ver_id < 80100) { self::patchFile('spc_fix_libxml2_12_php80.patch', SOURCE_PATH . '/php-src'); + self::patchFile('spc_fix_alpine_build_php80.patch', SOURCE_PATH . '/php-src'); return true; } if ($ver_id < 80200) { self::patchFile('spc_fix_libxml2_12_php81.patch', SOURCE_PATH . '/php-src'); + self::patchFile('spc_fix_alpine_build_php80.patch', SOURCE_PATH . '/php-src'); return true; } return false; diff --git a/src/globals/patch/spc_fix_alpine_build_php80.patch b/src/globals/patch/spc_fix_alpine_build_php80.patch new file mode 100644 index 00000000..bb51d434 --- /dev/null +++ b/src/globals/patch/spc_fix_alpine_build_php80.patch @@ -0,0 +1,28 @@ +diff --git a/main/streams/cast.c b/main/streams/cast.c +index 0978ca4d..677fc6dc 100644 +--- a/main/streams/cast.c ++++ b/main/streams/cast.c +@@ -102,6 +102,9 @@ static ssize_t stream_cookie_writer(void *cookie, const char *buffer, size_t siz + + # ifdef COOKIE_SEEKER_USES_OFF64_T + static int stream_cookie_seeker(void *cookie, off64_t *position, int whence) ++# else ++static int stream_cookie_seeker(void *cookie, off_t *position, int whence) ++# endif + { + + *position = php_stream_seek((php_stream *)cookie, (zend_off_t)*position, whence); +@@ -111,13 +114,6 @@ static int stream_cookie_seeker(void *cookie, off64_t *position, int whence) + } + return 0; + } +-# else +-static int stream_cookie_seeker(void *cookie, zend_off_t position, int whence) +-{ +- +- return php_stream_seek((php_stream *)cookie, position, whence); +-} +-# endif + + static int stream_cookie_closer(void *cookie) + {