Always populate utsname (#2391)

This commit is contained in:
George Barnett 2023-03-14 16:37:10 +00:00 committed by GitHub
parent 61043a36f6
commit 9b2848d76f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1483,7 +1483,8 @@ extension System {
#if os(Linux)
internal static let systemInfo: SystemInfo = {
var info = utsname()
assert(CNIOLinux_system_info(&info) == 0)
let rc = CNIOLinux_system_info(&info)
assert(rc == 0)
return SystemInfo(utsname: info)
}()