add -lpthread and -ldl in openssl::getStaticLibFiles

This commit is contained in:
DubbleClick
2025-06-06 16:56:08 +07:00
parent 92ad792eff
commit 617b0de31f
4 changed files with 15 additions and 4 deletions

View File

@@ -23,8 +23,9 @@ trait ngtcp2
'jemalloc' => null,
'libnghttp3' => null,
]);
if (PHP_OS_FAMILY === 'Linux') {
$args = preg_replace('/OPENSSL_LIBS="(.*?)"/', 'OPENSSL_LIBS="\1 -lpthread -ldl"', $args);
if ($brotli = $this->builder->getLib('brotli')) {
$args .= ' --with-libbrotlidec=yes LIBBROTLIDEC_CFLAGS="-I' . BUILD_ROOT_PATH . '/include" LIBBROTLIDEC_LIBS="' . $brotli->getStaticLibFiles() . '"';
$args .= ' --with-libbrotlienc=yes LIBBROTLIENC_CFLAGS="-I' . BUILD_ROOT_PATH . '/include" LIBBROTLIENC_LIBS="' . $brotli->getStaticLibFiles() . '"';
}
shell()->cd($this->source_dir)