diff --git a/src/SPC/builder/unix/library/libedit.php b/src/SPC/builder/unix/library/libedit.php index e436ee8b..2de9077f 100644 --- a/src/SPC/builder/unix/library/libedit.php +++ b/src/SPC/builder/unix/library/libedit.php @@ -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) diff --git a/src/SPC/store/SourcePatcher.php b/src/SPC/store/SourcePatcher.php index c08204f5..c7738e92 100644 --- a/src/SPC/store/SourcePatcher.php +++ b/src/SPC/store/SourcePatcher.php @@ -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