pkgsrc/lang/go110/patches/patch-src_runtime_os__netbsd.go
bsiegert 714330096e Add a versioned Go 1.10 package as lang/go110.
This uses a similar approach as go111. Its revision is one higher than
the existing lang/go.

Next steps:
 - make builds use this for dependent packages
 - delete lang/go to complete the move
2018-09-18 20:52:11 +00:00

21 lines
614 B
Go

$NetBSD: patch-src_runtime_os__netbsd.go,v 1.1 2018/09/18 20:52:11 bsiegert Exp $
--- src/runtime/os_netbsd.go.orig 2017-02-16 19:12:24.000000000 +0000
+++ src/runtime/os_netbsd.go
@@ -79,13 +79,13 @@ var sigset_all = sigset{[4]uint32{^uint3
// From NetBSD's <sys/sysctl.h>
const (
- _CTL_HW = 6
- _HW_NCPU = 3
+ _CTL_HW = 6
+ _HW_NCPUONLINE = 16
_HW_PAGESIZE = 7
)
func getncpu() int32 {
- mib := [2]uint32{_CTL_HW, _HW_NCPU}
+ mib := [2]uint32{_CTL_HW, _HW_NCPUONLINE}
out := uint32(0)
nout := unsafe.Sizeof(out)
ret := sysctl(&mib[0], 2, (*byte)(unsafe.Pointer(&out)), &nout, nil, 0)