From e5f2662c25dbdf2ed258867964e424f00f7a9cb8 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Fri, 27 Apr 2012 01:45:15 +1000 Subject: [PATCH] syscall: remove sysctl workaround for openbsd Now that Go will no longer work on OpenBSD versions prior to 5.1, remove the sysctl workaround that was needed for 5.0 and earlier. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6116050 --- src/pkg/syscall/syscall_bsd.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/pkg/syscall/syscall_bsd.go b/src/pkg/syscall/syscall_bsd.go index c1a822aa17..8269286daf 100644 --- a/src/pkg/syscall/syscall_bsd.go +++ b/src/pkg/syscall/syscall_bsd.go @@ -13,7 +13,6 @@ package syscall import ( - "runtime" "unsafe" ) @@ -553,16 +552,7 @@ func Sysctl(name string) (value string, err error) { return "", err } if n == 0 { - // TODO(jsing): Remove after OpenBSD 5.2 release. - // 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 runtime.GOOS == "openbsd" && (name == "kern.hostname" || name == "kern.domainname") { - // MAXHOSTNAMELEN - n = 256 - } else { - return "", nil - } + return "", nil } // Read into buffer of that size.