cgo: support errno value as second return parameter

Making this work on all targets was interesting but there's now a test
in place to make sure this works on all targets that have the CGo test
enabled (which is almost all targets).
This commit is contained in:
Ayke van Laethem
2024-11-06 14:57:56 +01:00
committed by Ayke
parent 548fba82e6
commit 6593cf22fa
23 changed files with 263 additions and 16 deletions
+6
View File
@@ -81,3 +81,9 @@ func procUnpin() {
func hardwareRand() (n uint64, ok bool) {
return random.GetRandomU64(), true
}
func libc_errno_location() *int32 {
// CGo is unavailable, so this function should be unreachable.
runtimePanic("runtime: no cgo errno")
return nil
}