1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci: fix compilation on FreeBSD

This commit is contained in:
Delyan Angelov 2021-11-22 09:32:13 +00:00
parent 84aa05f8fb
commit c3b8e5e181

View File

@ -673,8 +673,9 @@ pub fn executable() string {
return res
}
$if freebsd {
bufsize := usize(size)
mib := [1 /* CTL_KERN */, 14 /* KERN_PROC */, 12 /* KERN_PROC_PATHNAME */, -1]
unsafe { C.sysctl(mib.data, 4, result, &size, 0, 0) }
unsafe { C.sysctl(mib.data, mib.len, result, &bufsize, 0, 0) }
res := unsafe { tos_clone(result) }
return res
}