mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Fix pre-built openssl cannot find source in openssl ext patch
This commit is contained in:
parent
0839130845
commit
5bd9115a20
@ -13,7 +13,7 @@ class openssl extends Extension
|
||||
public function patchBeforeMake(): bool
|
||||
{
|
||||
// patch openssl3 with php8.0 bug
|
||||
if (file_exists(SOURCE_PATH . '/openssl/VERSION.dat') && $this->builder->getPHPVersionID() < 80100) {
|
||||
if ($this->builder->getPHPVersionID() < 80100) {
|
||||
$openssl_c = file_get_contents(SOURCE_PATH . '/php-src/ext/openssl/openssl.c');
|
||||
$openssl_c = preg_replace('/REGISTER_LONG_CONSTANT\s*\(\s*"OPENSSL_SSLV23_PADDING"\s*.+;/', '', $openssl_c);
|
||||
file_put_contents(SOURCE_PATH . '/php-src/ext/openssl/openssl.c', $openssl_c);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user