prevent libedit from building strlcat/strlcpy, no idea why their sour… (#937)

This commit is contained in:
Marc
2025-10-21 21:14:39 +07:00
committed by GitHub
2 changed files with 12 additions and 1 deletions

View File

@@ -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)

View File

@@ -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