mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix OSX build for sysinit
This commit is contained in:
parent
70c7220a99
commit
73a1ef7c22
3 changed files with 15 additions and 1 deletions
|
@ -32,7 +32,7 @@ func setupHostname(args *DockerInitArgs) error {
|
|||
if hostname == "" {
|
||||
return nil
|
||||
}
|
||||
return syscall.Sethostname([]byte(hostname))
|
||||
return setHostname(hostname)
|
||||
}
|
||||
|
||||
// Setup networking
|
||||
|
|
5
sysinit/sysinit_darwin.go
Normal file
5
sysinit/sysinit_darwin.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
package sysinit
|
||||
|
||||
func setHostname(hostname string) error {
|
||||
panic("Not supported on darwin")
|
||||
}
|
9
sysinit/sysinit_linux.go
Normal file
9
sysinit/sysinit_linux.go
Normal file
|
@ -0,0 +1,9 @@
|
|||
package sysinit
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func setHostname(hostname string) error {
|
||||
return syscall.Sethostname([]byte(hostname))
|
||||
}
|
Loading…
Reference in a new issue