mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin: fix building vinix (missing C.strerror)
This commit is contained in:
parent
e4e6c90292
commit
6438099644
@ -107,11 +107,13 @@ pub fn c_error_number_str(errnum int) string {
|
||||
$if freestanding {
|
||||
err_msg = 'error $errnum'
|
||||
} $else {
|
||||
c_msg := C.strerror(errnum)
|
||||
err_msg = string{
|
||||
str: &byte(c_msg)
|
||||
len: unsafe { C.strlen(c_msg) }
|
||||
is_lit: 1
|
||||
$if !vinix {
|
||||
c_msg := C.strerror(errnum)
|
||||
err_msg = string{
|
||||
str: &byte(c_msg)
|
||||
len: unsafe { C.strlen(c_msg) }
|
||||
is_lit: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
return err_msg
|
||||
|
Loading…
Reference in New Issue
Block a user