mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 14:03:39 +00:00
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:
@@ -313,3 +313,9 @@ func hardwareRand() (n uint64, ok bool) {
|
||||
// TODO: see whether there is a RNG and use it.
|
||||
return 0, false
|
||||
}
|
||||
|
||||
func libc_errno_location() *int32 {
|
||||
// CGo is unavailable, so this function should be unreachable.
|
||||
runtimePanic("runtime: no cgo errno")
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user