diff options
author | Russ Cox <rsc@golang.org> | 2019-05-08 11:44:15 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2019-05-09 21:13:18 +0000 |
commit | 6ed2ec4aa5ea6c34b1e3d42b7995c81ab74a27c4 (patch) | |
tree | cfa786127653271c1b4d3aff1c4d5cf0a2c76696 /src/runtime/stubs_linux.go | |
parent | cd03664f82a53dbe20d0b828189158ba3863039c (diff) | |
download | go-6ed2ec4aa5ea6c34b1e3d42b7995c81ab74a27c4.tar.gz go-6ed2ec4aa5ea6c34b1e3d42b7995c81ab74a27c4.zip |
runtime: fix vet complaints for linux/386
Working toward making the tree vet-safe instead of having
so many exceptions in cmd/vet/all/whitelist.
This CL makes "GOOS=linux GOARCH=386 go vet -unsafeptr=false runtime" happy,
while keeping "GO_BUILDER_NAME=misc-vetall go tool dist test" happy too.
For #31916.
Change-Id: I3e5586a7ff6e359357350d0602c2259493280ded
Reviewed-on: https://go-review.googlesource.com/c/go/+/176099
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/stubs_linux.go')
-rw-r--r-- | src/runtime/stubs_linux.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/runtime/stubs_linux.go b/src/runtime/stubs_linux.go index d10f657197..e75fcf6c95 100644 --- a/src/runtime/stubs_linux.go +++ b/src/runtime/stubs_linux.go @@ -6,4 +6,14 @@ package runtime +import "unsafe" + func sbrk0() uintptr + +// Called from write_err_android.go only, but defined in sys_linux_*.s; +// declared here (instead of in write_err_android.go) for go vet on non-android builds. +// The return value is the raw syscall result, which may encode an error number. +//go:noescape +func access(name *byte, mode int32) int32 +func connect(fd int32, addr unsafe.Pointer, len int32) int32 +func socket(domain int32, typ int32, prot int32) int32 |