aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/runtime
diff options
context:
space:
mode:
authorNikhil Benesch <nikhil.benesch@gmail.com>2020-10-13 06:36:43 +0000
committerIan Lance Taylor <iant@golang.org>2020-10-14 13:56:01 -0700
commitdc570700beab4080040884690deb6016090b4fa8 (patch)
tree0071ca0e6830bbe09ffaa032f217a587a5345dc1 /libgo/go/runtime
parentca56d576241c6783eb36eea526b42c4f3fbf697b (diff)
downloadgcc-dc570700beab4080040884690deb6016090b4fa8.zip
gcc-dc570700beab4080040884690deb6016090b4fa8.tar.gz
gcc-dc570700beab4080040884690deb6016090b4fa8.tar.bz2
libgo: export NetBSD-specific types in mksysinfo.sh
The syscall package depends on many NetBSD-specific types on NetBSD. Teach mksysinfo.sh to export these types. This alone is not sufficient to get the syscall package to compile on NetBSD, but it's a start. Note that the IfMsgHdr type is recapitalized to IfMsghdr, which requires changes in the AIX port. The new capitalization is what's used by upstream in existing NetBSD-specific code and is more consistent with the capitalization of other C structs with the "hdr" suffix. Updates golang/go#38538. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/261739
Diffstat (limited to 'libgo/go/runtime')
-rw-r--r--libgo/go/runtime/os_netbsd.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/libgo/go/runtime/os_netbsd.go b/libgo/go/runtime/os_netbsd.go
index 89a8d07..9ebb652 100644
--- a/libgo/go/runtime/os_netbsd.go
+++ b/libgo/go/runtime/os_netbsd.go
@@ -33,13 +33,6 @@ func lwp_unpark(lwp int32, hint unsafe.Pointer) int32
//extern sysctl
func sysctl(*uint32, uint32, *byte, *uintptr, *byte, uintptr) int32
-// From NetBSD's <sys/sysctl.h>
-const (
- _CTL_HW = 6
- _HW_NCPU = 3
- _HW_PAGESIZE = 7
-)
-
func getncpu() int32 {
mib := [2]uint32{_CTL_HW, _HW_NCPU}
out := uint32(0)