mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-20 15:25:36 +08:00
only apply ffi patch at version >= 8.3.16
This commit is contained in:
@@ -454,6 +454,9 @@ class SourcePatcher
|
|||||||
|
|
||||||
public static function patchFfiCentos7FixO3strncmp(): bool
|
public static function patchFfiCentos7FixO3strncmp(): bool
|
||||||
{
|
{
|
||||||
|
if (PHP_OS_FAMILY !== 'Linux' || SystemUtil::getLibcVersionIfExists() >= '2.17') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$version = null;
|
$version = null;
|
||||||
if (file_exists(SOURCE_PATH . '/php-src/main/php_version.h')) {
|
if (file_exists(SOURCE_PATH . '/php-src/main/php_version.h')) {
|
||||||
$file = SOURCE_PATH . '/php-src/main/php_version.h';
|
$file = SOURCE_PATH . '/php-src/main/php_version.h';
|
||||||
@@ -464,11 +467,8 @@ class SourcePatcher
|
|||||||
if (version_compare($version, '8.3.16', '<')) {
|
if (version_compare($version, '8.3.16', '<')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (PHP_OS_FAMILY === 'Linux' && SystemUtil::getLibcVersionIfExists() === '2.17') {
|
SourcePatcher::patchFile('ffi_centos7_fix_O3_strncmp.patch', SOURCE_PATH . '/php-src');
|
||||||
SourcePatcher::patchFile('ffi_centos7_fix_O3_strncmp.patch', SOURCE_PATH . '/php-src');
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function patchLibaomForAlpine(): bool
|
public static function patchLibaomForAlpine(): bool
|
||||||
|
|||||||
Reference in New Issue
Block a user