mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-08 17:35:36 +08:00
Fix bcmath with c23 bug
This commit is contained in:
@@ -125,6 +125,15 @@ class SourcePatcher
|
|||||||
FileSystem::replaceFileRegex(SOURCE_PATH . '/php-src/configure', '/have_capstone="yes"/', 'have_capstone="no"');
|
FileSystem::replaceFileRegex(SOURCE_PATH . '/php-src/configure', '/have_capstone="yes"/', 'have_capstone="no"');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PHP 8.2 and below: bcmath libbcmath uses K&R style C function
|
||||||
|
if (is_unix() && $builder->getPHPVersionID() < 80300) {
|
||||||
|
FileSystem::replaceFileStr(
|
||||||
|
SOURCE_PATH . '/php-src/configure',
|
||||||
|
"for ac_arg in '' -std=gnu23",
|
||||||
|
"for ac_arg in ''"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (file_exists(SOURCE_PATH . '/php-src/configure.ac.bak')) {
|
if (file_exists(SOURCE_PATH . '/php-src/configure.ac.bak')) {
|
||||||
// restore configure.ac
|
// restore configure.ac
|
||||||
FileSystem::restoreBackupFile(SOURCE_PATH . '/php-src/configure.ac');
|
FileSystem::restoreBackupFile(SOURCE_PATH . '/php-src/configure.ac');
|
||||||
|
|||||||
Reference in New Issue
Block a user