os: create sys_bsd.go
R=rsc
CC=golang-dev
https://golang.org/cl/897042
diff --git a/src/pkg/os/Makefile b/src/pkg/os/Makefile
index b69ac24..ebb1665d 100644
--- a/src/pkg/os/Makefile
+++ b/src/pkg/os/Makefile
@@ -15,24 +15,28 @@
path.go\
proc.go\
stat_$(GOOS).go\
- sys_$(GOOS).go\
time.go\
types.go\
GOFILES_freebsd=\
file_unix.go\
+ sys_bsd.go\
GOFILES_darwin=\
file_unix.go\
+ sys_bsd.go\
GOFILES_linux=\
file_unix.go\
+ sys_linux.go\
GOFILES_nacl=\
file_unix.go\
+ sys_nacl.go\
GOFILES_mingw=\
file_mingw.go\
+ sys_mingw.go\
GOFILES+=$(GOFILES_$(GOOS))
diff --git a/src/pkg/os/sys_freebsd.go b/src/pkg/os/sys_bsd.go
similarity index 83%
rename from src/pkg/os/sys_freebsd.go
rename to src/pkg/os/sys_bsd.go
index c567f5c..188993b 100644
--- a/src/pkg/os/sys_freebsd.go
+++ b/src/pkg/os/sys_bsd.go
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// os code shared between *BSD systems including OS X (Darwin)
+// and FreeBSD.
+
package os
import "syscall"
diff --git a/src/pkg/os/sys_darwin.go b/src/pkg/os/sys_darwin.go
deleted file mode 100644
index 2e3ab21..0000000
--- a/src/pkg/os/sys_darwin.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Darwin-specific
-
-package os
-
-import "syscall"
-
-func Hostname() (name string, err Error) {
- var errno int
- name, errno = syscall.Sysctl("kern.hostname")
- if errno != 0 {
- return "", NewSyscallError("sysctl kern.hostname", errno)
- }
- return name, nil
-}