diff --git a/libcontainer/system/syscall_linux_386.go b/libcontainer/system/syscall_linux_32.go similarity index 93% rename from libcontainer/system/syscall_linux_386.go rename to libcontainer/system/syscall_linux_32.go index 3f7235ed1..c5ca5d862 100644 --- a/libcontainer/system/syscall_linux_386.go +++ b/libcontainer/system/syscall_linux_32.go @@ -1,4 +1,5 @@ -// +build linux,386 +// +build linux +// +build 386 arm package system diff --git a/libcontainer/system/syscall_linux_64.go b/libcontainer/system/syscall_linux_64.go index d7891a2ff..11c3faafb 100644 --- a/libcontainer/system/syscall_linux_64.go +++ b/libcontainer/system/syscall_linux_64.go @@ -1,4 +1,5 @@ -// +build linux,arm64 linux,amd64 linux,ppc linux,ppc64 linux,ppc64le linux,s390x +// +build linux +// +build arm64 amd64 mips mipsle mips64 mips64le ppc ppc64 ppc64le s390x package system diff --git a/libcontainer/system/syscall_linux_arm.go b/libcontainer/system/syscall_linux_arm.go deleted file mode 100644 index 31ff3deb1..000000000 --- a/libcontainer/system/syscall_linux_arm.go +++ /dev/null @@ -1,25 +0,0 @@ -// +build linux,arm - -package system - -import ( - "golang.org/x/sys/unix" -) - -// Setuid sets the uid of the calling thread to the specified uid. -func Setuid(uid int) (err error) { - _, _, e1 := unix.RawSyscall(unix.SYS_SETUID32, uintptr(uid), 0, 0) - if e1 != 0 { - err = e1 - } - return -} - -// Setgid sets the gid of the calling thread to the specified gid. -func Setgid(gid int) (err error) { - _, _, e1 := unix.RawSyscall(unix.SYS_SETGID32, uintptr(gid), 0, 0) - if e1 != 0 { - err = e1 - } - return -} diff --git a/libcontainer/system/syscall_linux_mipsx.go b/libcontainer/system/syscall_linux_mipsx.go deleted file mode 100644 index 98a3f088b..000000000 --- a/libcontainer/system/syscall_linux_mipsx.go +++ /dev/null @@ -1,25 +0,0 @@ -// +build linux,mips linux,mipsle linux,mips64 linux,mips64le - -package system - -import ( - "syscall" -) - -// Setuid sets the uid of the calling thread to the specified uid. -func Setuid(uid int) (err error) { - _, _, e1 := syscall.RawSyscall(syscall.SYS_SETUID, uintptr(uid), 0, 0) - if e1 != 0 { - err = e1 - } - return -} - -// Setgid sets the gid of the calling thread to the specified gid. -func Setgid(gid int) (err error) { - _, _, e1 := syscall.RawSyscall(syscall.SYS_SETGID, uintptr(gid), 0, 0) - if e1 != 0 { - err = e1 - } - return -}