Skip to content

Commit f6a1065

Browse files
committed
fix libc detection too
1 parent 4a2b28e commit f6a1065

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/SPC/util/SPCTarget.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ public static function getLibc(): ?string
6060
if (str_contains($target, '-musl')) {
6161
return 'musl';
6262
}
63-
if (str_contains($target, '-linux')) {
64-
return 'musl';
65-
}
66-
if (PHP_OS_FAMILY === 'Linux' && str_contains($target, '-native')) {
67-
return 'musl';
63+
if (PHP_OS_FAMILY === 'Linux') {
64+
return SystemUtil::isMuslDist() ? 'musl' : 'glibc';
6865
}
6966
}
7067
$libc = getenv('SPC_LIBC');
7168
if ($libc !== false) {
7269
return $libc;
7370
}
71+
if (PHP_OS_FAMILY === 'Linux') {
72+
return SystemUtil::isMuslDist() ? 'musl' : 'glibc';
73+
}
7474
return null;
7575
}
7676

0 commit comments

Comments
 (0)