Skip to content

Commit d5e7f00

Browse files
committed
Fix missing linking libs for gnu docker
1 parent b8854f1 commit d5e7f00

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

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

55
namespace SPC\builder\unix\library;
66

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

910
trait net_snmp
1011
{
12+
public function patchBeforeBuild(): bool
13+
{
14+
if (PHP_OS_FAMILY === 'Linux') {
15+
FileSystem::replaceFileStr("{$this->source_dir}/configure", 'LIBS="-lssl ${OPENSSL_LIBS}"', 'LIBS="-lssl ${OPENSSL_LIBS} -lpthread -ldl"');
16+
return true;
17+
}
18+
return false;
19+
}
20+
1121
protected function build(): void
1222
{
1323
// use --static for PKG_CONFIG

0 commit comments

Comments
 (0)