Fix OSX build for sysinit

Upstream-commit: 73a1ef7c22f5cde9db5e1292f1340885bf28e807
Component: engine
This commit is contained in:
Guillaume J. Charmes
2013-12-18 10:16:48 -08:00
parent 5f28e84d16
commit f609f65b61
3 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ func setupHostname(args *DockerInitArgs) error {
if hostname == "" {
return nil
}
return syscall.Sethostname([]byte(hostname))
return setHostname(hostname)
}
// Setup networking
@@ -0,0 +1,5 @@
package sysinit
func setHostname(hostname string) error {
panic("Not supported on darwin")
}
@@ -0,0 +1,9 @@
package sysinit
import (
"syscall"
)
func setHostname(hostname string) error {
return syscall.Sethostname([]byte(hostname))
}