1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #639 from fsouza/fix-utils-darwin

utils: fix compilation on Darwin
This commit is contained in:
Guillaume J. Charmes 2013-05-20 10:10:30 -07:00
commit 2879ef4642
2 changed files with 8 additions and 4 deletions

View file

@ -2,9 +2,12 @@ package utils
import (
"errors"
"syscall"
)
func uname() (*syscall.Utsname, error) {
type Utsname struct {
Release [65]byte
}
func uname() (*Utsname, error) {
return nil, errors.New("Kernel version detection is not available on darwin")
}

View file

@ -4,8 +4,9 @@ import (
"syscall"
)
// FIXME: Move this to utils package
func uname() (*syscall.Utsname, error) {
type Utsname syscall.Utsname
func uname() (*Utsname, error) {
uts := &syscall.Utsname{}
if err := syscall.Uname(uts); err != nil {