Get the Docker Engine to build clean on Solaris

Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
This commit is contained in:
Amit Krishnan 2016-03-25 16:38:00 -07:00
parent d97f6ab5f1
commit a531a67461
23 changed files with 495 additions and 27 deletions

View file

@ -1,15 +0,0 @@
package platform
import (
"os/exec"
)
// runtimeArchitecture gets the name of the current architecture (x86, x86_64, …)
func runtimeArchitecture() (string, error) {
cmd := exec.Command("uname", "-m")
machine, err := cmd.Output()
if err != nil {
return "", err
}
return string(machine), nil
}

View file

@ -0,0 +1,18 @@
// +build freebsd solaris
package platform
import (
"os/exec"
"strings"
)
// runtimeArchitecture get the name of the current architecture (i86pc, sun4v)
func runtimeArchitecture() (string, error) {
cmd := exec.Command("/usr/bin/uname", "-m")
machine, err := cmd.Output()
if err != nil {
return "", err
}
return strings.TrimSpace(string(machine)), nil
}