]> Cypherpunks repositories - gostls13.git/commitdiff
os: fix build on freebsd/arm
authorMikio Hara <mikioh.mikioh@gmail.com>
Tue, 14 Jun 2016 01:14:28 +0000 (10:14 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Tue, 14 Jun 2016 01:42:36 +0000 (01:42 +0000)
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>
src/os/wait_wait6.go

index 279c6f2804c8d6d76f20f4b93a14bd46a15fea42..2f27feda8ddb1d36fc32e7032c41a2cb6be15678 100644 (file)
@@ -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 {