aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikio Hara <mikioh.mikioh@gmail.com>2016-06-14 10:14:28 +0900
committerMikio Hara <mikioh.mikioh@gmail.com>2016-06-14 01:42:36 +0000
commitcab87a60dec2c771c12ba08b82bb7645228192e6 (patch)
treee5966e35b8f94e0817549182ecccc662dd32cbed
parent5d876e3e2eb3a30a8c66888912cf41785fa65a96 (diff)
downloadgo-cab87a60dec2c771c12ba08b82bb7645228192e6.tar.gz
go-cab87a60dec2c771c12ba08b82bb7645228192e6.zip
os: fix build on freebsd/arm
Change-Id: I21fad94ff94e342ada18e0e41ca90296d030115f Reviewed-on: https://go-review.googlesource.com/24061 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-rw-r--r--src/os/wait_wait6.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/os/wait_wait6.go b/src/os/wait_wait6.go
index 279c6f2804..2f27feda8d 100644
--- a/src/os/wait_wait6.go
+++ b/src/os/wait_wait6.go
@@ -18,14 +18,13 @@ const _P_PID = 0
// It does not actually call p.Wait.
func (p *Process) blockUntilWaitable() (bool, error) {
var errno syscall.Errno
- switch runtime.GOARCH {
- case "386", "arm":
- // The arguments on 32-bit FreeBSD look like the
- // following:
+ if runtime.GOARCH == "386" {
+ // The arguments on 32-bit FreeBSD except ARM look
+ // like the following:
// - freebsd32_wait6_args{ idtype, id1, id2, status, options, wrusage, info } or
// - freebsd32_wait6_args{ idtype, pad, id1, id2, status, options, wrusage, info } when PAD64_REQUIRED=1 on MIPS or PowerPC
_, _, errno = syscall.Syscall9(syscall.SYS_WAIT6, _P_PID, 0, uintptr(p.Pid), 0, syscall.WEXITED|syscall.WNOWAIT, 0, 0, 0, 0)
- default:
+ } else {
_, _, errno = syscall.Syscall6(syscall.SYS_WAIT6, _P_PID, uintptr(p.Pid), 0, syscall.WEXITED|syscall.WNOWAIT, 0, 0)
}
if errno != 0 {