From 3bd18c2c54b94bcc108e7e6da7653508d2f94bf6 Mon Sep 17 00:00:00 2001 From: Yohei Ueda Date: Fri, 21 Nov 2014 14:18:48 +0000 Subject: [PATCH] Add support for ppc64, ppc64le, s390x Signed-off-by: Yohei Ueda --- system/setns_linux.go | 9 ++++++--- system/{syscall_linux_amd64.go => syscall_linux_64.go} | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) rename system/{syscall_linux_amd64.go => syscall_linux_64.go} (88%) diff --git a/system/setns_linux.go b/system/setns_linux.go index 32821ee2b..228e6ccd7 100644 --- a/system/setns_linux.go +++ b/system/setns_linux.go @@ -11,9 +11,12 @@ import ( // We need different setns values for the different platforms and arch // We are declaring the macro here because the SETNS syscall does not exist in th stdlib var setNsMap = map[string]uintptr{ - "linux/386": 346, - "linux/amd64": 308, - "linux/arm": 374, + "linux/386": 346, + "linux/amd64": 308, + "linux/arm": 374, + "linux/ppc64": 350, + "linux/ppc64le": 350, + "linux/s390x": 339, } func Setns(fd uintptr, flags uintptr) error { diff --git a/system/syscall_linux_amd64.go b/system/syscall_linux_64.go similarity index 88% rename from system/syscall_linux_amd64.go rename to system/syscall_linux_64.go index 516c17e92..6840c3770 100644 --- a/system/syscall_linux_amd64.go +++ b/system/syscall_linux_64.go @@ -1,4 +1,4 @@ -// +build linux,amd64 +// +build linux,amd64 linux,ppc64 linux,ppc64le linux,s390x package system