mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 00:05:42 +08:00
Fix gmssl and openssl duplicate symbol (#632)
* Fix gmssl and openssl duplicate symbol * Add tests
This commit is contained in:
@@ -30,6 +30,7 @@ class SourcePatcher
|
||||
FileSystem::addSourceExtractHook('ext-imagick', [SourcePatcher::class, 'patchImagickWith84']);
|
||||
FileSystem::addSourceExtractHook('libaom', [SourcePatcher::class, 'patchLibaomForAlpine']);
|
||||
FileSystem::addSourceExtractHook('attr', [SourcePatcher::class, 'patchAttrForAlpine']);
|
||||
FileSystem::addSourceExtractHook('gmssl', [SourcePatcher::class, 'patchGMSSL']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -541,4 +542,10 @@ class SourcePatcher
|
||||
rename(SOURCE_PATH . '\php-src\sapi\micro\php_micro.c.win32bak', SOURCE_PATH . '\php-src\sapi\micro\php_micro.c');
|
||||
}
|
||||
}
|
||||
|
||||
public static function patchGMSSL(): void
|
||||
{
|
||||
FileSystem::replaceFileStr(SOURCE_PATH . '/gmssl/src/hex.c', 'unsigned char *OPENSSL_hexstr2buf(const char *str, size_t *len)', 'unsigned char *GMSSL_hexstr2buf(const char *str, size_t *len)');
|
||||
FileSystem::replaceFileStr(SOURCE_PATH . '/gmssl/src/hex.c', 'OPENSSL_hexchar2int', 'GMSSL_hexchar2int');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user