mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
src: make use of runtime.GOOS, GOARCH instead of syscall.OS, ARCH
R=rsc, r CC=golang-dev https://golang.org/cl/5545048
This commit is contained in:
parent
5f7337769c
commit
92c8df46c6
35 changed files with 51 additions and 83 deletions
|
|
@ -12,7 +12,10 @@
|
|||
|
||||
package syscall
|
||||
|
||||
import "unsafe"
|
||||
import (
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
/*
|
||||
* Pseudo-system calls
|
||||
|
|
@ -554,7 +557,7 @@ func Sysctl(name string) (value string, err error) {
|
|||
// Work around a bug that was fixed after OpenBSD 5.0.
|
||||
// The length for kern.hostname and kern.domainname is always
|
||||
// returned as 0 when a nil value is passed for oldp.
|
||||
if OS == "openbsd" && (name == "kern.hostname" || name == "kern.domainname") {
|
||||
if runtime.GOOS == "openbsd" && (name == "kern.hostname" || name == "kern.domainname") {
|
||||
// MAXHOSTNAMELEN
|
||||
n = 256
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue