unix: fix freebsd/arm build, fix freebsd/{386,arm} tests

Re-run mkall.sh on FreeBSD-11.1-RELEASE armv6 for Capsicum consts and
POSIX.1-2008 path relative *at() syscalls.

Add errors_freebsd_arm.go generated semi-automatically using:
https://gist.github.com/paulzhol/c6d54dc2baf2a6bd204b343a15459661
Similar to https://golang.org/cl/51570. In order to handle C enum based
constants that mkerrors.sh missed.

Use fix from https://golang.org/cl/53639 to run Capsicum tests only on amd64.

Fixes golang/go#21136

Change-Id: I9681b033531090e6b1c5e2446a442deb39cf3066
Reviewed-on: https://go-review.googlesource.com/53691
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
diff --git a/unix/ztypes_freebsd_arm.go b/unix/ztypes_freebsd_arm.go
index 3fb080d..42c0a50 100644
--- a/unix/ztypes_freebsd_arm.go
+++ b/unix/ztypes_freebsd_arm.go
@@ -1,5 +1,5 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -fsigned-char types_freebsd.go
+// cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
 
 // +build arm,freebsd
 
@@ -88,7 +88,7 @@
 	Ctimespec     Timespec
 	Size          int64
 	Blocks        int64
-	Blksize       uint32
+	Blksize       int32
 	Flags         uint32
 	Gen           uint32
 	Lspare        int32
@@ -142,6 +142,15 @@
 	Val [2]int32
 }
 
+const (
+	FADV_NORMAL     = 0x0
+	FADV_RANDOM     = 0x1
+	FADV_SEQUENTIAL = 0x2
+	FADV_WILLNEED   = 0x3
+	FADV_DONTNEED   = 0x4
+	FADV_NOREUSE    = 0x5
+)
+
 type RawSockaddrInet4 struct {
 	Len    uint8
 	Family uint8
@@ -282,9 +291,9 @@
 }
 
 const (
-	sizeofIfMsghdr         = 0x70
+	sizeofIfMsghdr         = 0xa8
 	SizeofIfMsghdr         = 0x70
-	sizeofIfData           = 0x60
+	sizeofIfData           = 0x98
 	SizeofIfData           = 0x60
 	SizeofIfaMsghdr        = 0x14
 	SizeofIfmaMsghdr       = 0x10
@@ -316,31 +325,31 @@
 }
 
 type ifData struct {
-	Type        uint8
-	Physical    uint8
-	Addrlen     uint8
-	Hdrlen      uint8
-	Link_state  uint8
-	Vhid        uint8
-	Baudrate_pf uint8
-	Datalen     uint8
-	Mtu         uint32
-	Metric      uint32
-	Baudrate    uint32
-	Ipackets    uint32
-	Ierrors     uint32
-	Opackets    uint32
-	Oerrors     uint32
-	Collisions  uint32
-	Ibytes      uint32
-	Obytes      uint32
-	Imcasts     uint32
-	Omcasts     uint32
-	Iqdrops     uint32
-	Noproto     uint32
-	Hwassist    uint64
-	Epoch       int64
-	Lastchange  Timeval
+	Type              uint8
+	Physical          uint8
+	Addrlen           uint8
+	Hdrlen            uint8
+	Link_state        uint8
+	Vhid              uint8
+	Datalen           uint16
+	Mtu               uint32
+	Metric            uint32
+	Baudrate          uint64
+	Ipackets          uint64
+	Ierrors           uint64
+	Opackets          uint64
+	Oerrors           uint64
+	Collisions        uint64
+	Ibytes            uint64
+	Obytes            uint64
+	Imcasts           uint64
+	Omcasts           uint64
+	Iqdrops           uint64
+	Oqdrops           uint64
+	Noproto           uint64
+	Hwassist          uint64
+	X__ifi_epoch      [8]byte
+	X__ifi_lastchange [16]byte
 }
 
 type IfData struct {
@@ -502,3 +511,14 @@
 	Xpixel uint16
 	Ypixel uint16
 }
+
+const (
+	AT_FDCWD            = -0x64
+	AT_REMOVEDIR        = 0x800
+	AT_SYMLINK_FOLLOW   = 0x400
+	AT_SYMLINK_NOFOLLOW = 0x200
+)
+
+type CapRights struct {
+	Rights [2]uint64
+}