ensure liburing is only pulled in by suggested libs when glibc >= 2.30 (or musl)

This commit is contained in:
DubbleClick
2025-08-26 14:07:49 +07:00
parent 43352ab986
commit 4eac953c71
5 changed files with 35 additions and 4 deletions

View File

@@ -100,6 +100,10 @@ class SPCTarget
public static function getLibcVersion(): ?string
{
if (PHP_OS_FAMILY === 'Linux') {
$target = getenv('SPC_TARGET');
if (str_contains($target, '-gnu.2.')) {
return preg_match('/-gnu\.(2\.\d+)/', $target, $matches) ? $matches[1] : null;
}
$libc = self::getLibc();
return SystemUtil::getLibcVersionIfExists($libc);
}