-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hi,
Thank you for the wonderful library. I have used it to experiment with ReactPHP as a replacement for the stream_select based event loop.
I am using Fedora 38 and do not have ID_LIKE in the os-release file.
Also looking at https://www.freedesktop.org/software/systemd/man/os-release.html, would it be a bit more stable if the ID is used instead or perhaps a combination of the two variables? :)
I have used something like the below code on my machine:
$idLikeMap = [];
if (isset($os['ID_LIKE'])) {
$idLike = \explode(" ", \trim((string) $os['ID_LIKE']));
$idLikeMap = array_combine(array_values($idLike), array_values($idLike));
}
$id = \trim((string) $os['ID']);
$version = \trim((string) $os['VERSION_ID']);
if ($id === 'debian' || isset($idLikeMap['debian'])) {
$code = $directory . 'headers/uv_ubuntu' . ((float)$version < 20.04 ? '18.04' : '20.04') . '.h';
} elseif ($id === 'redhat' || $id === 'fedora' || isset($idLikeMap['redhat']) || isset($ididLikeMapLike['fedora'])) {
$code = $directory . 'headers/uv_centos' . ((float)$version < 8 ? '7' : '8+') . '.h';
}
Best Regards
Metadata
Metadata
Assignees
Labels
No labels