mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
prevent libedit from building strlcat/strlcpy, no idea why their sour… (#937)
This commit is contained in:
commit
553b817b2a
@ -4,10 +4,21 @@ declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\unix\library;
|
||||
|
||||
use SPC\store\FileSystem;
|
||||
use SPC\util\executor\UnixAutoconfExecutor;
|
||||
|
||||
trait libedit
|
||||
{
|
||||
public function patchBeforeBuild(): bool
|
||||
{
|
||||
FileSystem::replaceFileRegex(
|
||||
$this->source_dir . '/src/sys.h',
|
||||
'|//#define\s+strl|',
|
||||
'#define strl'
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function build(): void
|
||||
{
|
||||
UnixAutoconfExecutor::create($this)
|
||||
|
||||
@ -44,7 +44,7 @@ class SourcePatcher
|
||||
}
|
||||
foreach ($builder->getLibs() as $lib) {
|
||||
if ($lib->patchBeforeBuildconf() === true) {
|
||||
logger()->info("Library [{$lib->getName()}]patched before buildconf");
|
||||
logger()->info("Library [{$lib->getName()}] patched before buildconf");
|
||||
}
|
||||
}
|
||||
// patch windows php 8.1 bug
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user