builtin: fix building vinix (missing C.strerror)

pull/10968/head
Delyan Angelov 2021-07-25 22:16:11 +03:00
parent e4e6c90292
commit 6438099644
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 7 additions and 5 deletions

View File

@ -107,11 +107,13 @@ pub fn c_error_number_str(errnum int) string {
$if freestanding { $if freestanding {
err_msg = 'error $errnum' err_msg = 'error $errnum'
} $else { } $else {
c_msg := C.strerror(errnum) $if !vinix {
err_msg = string{ c_msg := C.strerror(errnum)
str: &byte(c_msg) err_msg = string{
len: unsafe { C.strlen(c_msg) } str: &byte(c_msg)
is_lit: 1 len: unsafe { C.strlen(c_msg) }
is_lit: 1
}
} }
} }
return err_msg return err_msg