mirror of
https://github.com/moby/moby.git
synced 2026-08-02 22:26:52 +00:00
[project] change syscall to /x/sys/unix|windows
Changes most references of syscall to golang.org/x/sys/
Ones aren't changes include, Errno, Signal and SysProcAttr
as they haven't been implemented in /x/sys/.
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
[s390x] switch utsname from unsigned to signed
per 33267e036f
char in s390x in the /x/sys/unix package is now signed, so
change the buildtags
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
package platform
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// runtimeArchitecture gets the name of the current architecture (x86, x86_64, …)
|
||||
func runtimeArchitecture() (string, error) {
|
||||
utsname := &syscall.Utsname{}
|
||||
if err := syscall.Uname(utsname); err != nil {
|
||||
utsname := &unix.Utsname{}
|
||||
if err := unix.Uname(utsname); err != nil {
|
||||
return "", err
|
||||
}
|
||||
return charsToString(utsname.Machine), nil
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// +build linux,386 linux,amd64 linux,arm64
|
||||
// see golang's sources src/syscall/ztypes_linux_*.go that use int8
|
||||
// +build linux,386 linux,amd64 linux,arm64 s390x
|
||||
// see golang's sources golang.org/x/sys/unix/ztypes_linux_*.go that use int8
|
||||
|
||||
package platform
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// +build linux,386 linux,amd64 linux,arm64
|
||||
// +build linux,386 linux,amd64 linux,arm64 s390x
|
||||
|
||||
package platform
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// +build linux,arm linux,ppc64 linux,ppc64le s390x
|
||||
// see golang's sources src/syscall/ztypes_linux_*.go that use uint8
|
||||
// +build linux,arm linux,ppc64 linux,ppc64le
|
||||
// see golang's sources golang.org/x/sys/unix/ztypes_linux_*.go that use uint8
|
||||
|
||||
package platform
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// +build linux,arm linux,ppc64 linux,ppc64le s390x
|
||||
// +build linux,arm linux,ppc64 linux,ppc64le
|
||||
|
||||
package platform
|
||||
|
||||
|
||||
Reference in New Issue
Block a user