Skip to content

Commit 553b817

Browse files
authored
prevent libedit from building strlcat/strlcpy, no idea why their sour… (#937)
2 parents 41fb29e + 96592bc commit 553b817

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/SPC/builder/unix/library/libedit.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,21 @@
44

55
namespace SPC\builder\unix\library;
66

7+
use SPC\store\FileSystem;
78
use SPC\util\executor\UnixAutoconfExecutor;
89

910
trait libedit
1011
{
12+
public function patchBeforeBuild(): bool
13+
{
14+
FileSystem::replaceFileRegex(
15+
$this->source_dir . '/src/sys.h',
16+
'|//#define\s+strl|',
17+
'#define strl'
18+
);
19+
return true;
20+
}
21+
1122
protected function build(): void
1223
{
1324
UnixAutoconfExecutor::create($this)

src/SPC/store/SourcePatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static function patchBeforeBuildconf(BuilderBase $builder): void
4444
}
4545
foreach ($builder->getLibs() as $lib) {
4646
if ($lib->patchBeforeBuildconf() === true) {
47-
logger()->info("Library [{$lib->getName()}]patched before buildconf");
47+
logger()->info("Library [{$lib->getName()}] patched before buildconf");
4848
}
4949
}
5050
// patch windows php 8.1 bug

0 commit comments

Comments
 (0)