mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-06 12:03:41 +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:
@@ -127,3 +127,8 @@ func write(fd uintptr, p unsafe.Pointer, n int32) int32 {
|
||||
func getAuxv() []uintptr {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Called from cgo to obtain the errno value.
|
||||
func cgo_errno() uintptr {
|
||||
return uintptr(*libc_errno_location())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user