mirror of
https://github.com/golang/go
synced 2024-11-24 14:30:17 -07:00
syscall: fix openbsd sysctl hostname/domainname workaround
Fixes #2509. R=golang-dev, adg CC=golang-dev https://golang.org/cl/5451055
This commit is contained in:
parent
07ee3cc741
commit
595efd0d20
@ -563,7 +563,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" && (value == "kern.hostname" || value == "kern.domainname") {
|
||||
if OS == "openbsd" && (name == "kern.hostname" || name == "kern.domainname") {
|
||||
// MAXHOSTNAMELEN
|
||||
n = 256
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user