Skip to content

Commit

Permalink
unix: regenerate all definitions on FreeBSD 12.1 on {386,amd64,arm64}
Browse files Browse the repository at this point in the history
I just created a couple of virtual machines/QEMU instances containing
stock copies of FreeBSD 12.1-RELEASE. On these systems I ran mkall.sh,
thereby bringing the definitions in sync with that version of FreeBSD.

I also attempted to bring the GOOS=freebsd GOARCH=arm port up to date,
but was unfortunately not able to do so. There doesn't seem to be any
documentation on how to bring this port of FreeBSD up on an emulator.
The only option seems to be to use physical hardware.

Change-Id: I54c9f5d15587996ad5fbb535480ab0aa0e723260
GitHub-Last-Rev: ad79b1b
GitHub-Pull-Request: #63
Reviewed-on: https://go-review.googlesource.com/c/sys/+/223698
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
EdSchouten authored and tklauser committed Mar 17, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent a7d97aa commit 5766fd3
Showing 13 changed files with 536 additions and 159 deletions.
6 changes: 6 additions & 0 deletions unix/errors_freebsd_386.go
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
package unix

const (
DLT_HHDLC = 0x79
IFF_SMART = 0x20
IFT_1822 = 0x2
IFT_A12MPPSWITCH = 0x82
@@ -210,13 +211,18 @@ const (
IFT_XETHER = 0x1a
IPPROTO_MAXID = 0x34
IPV6_FAITH = 0x1d
IPV6_MIN_MEMBERSHIPS = 0x1f
IP_FAITH = 0x16
IP_MAX_SOURCE_FILTER = 0x400
IP_MIN_MEMBERSHIPS = 0x1f
MAP_NORESERVE = 0x40
MAP_RENAME = 0x20
NET_RT_MAXID = 0x6
RTF_PRCLONING = 0x10000
RTM_OLDADD = 0x9
RTM_OLDDEL = 0xa
RT_CACHING_CONTEXT = 0x1
RT_NORTREF = 0x2
SIOCADDRT = 0x8030720a
SIOCALIFADDR = 0x8118691b
SIOCDELRT = 0x8030720b
6 changes: 6 additions & 0 deletions unix/errors_freebsd_amd64.go
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
package unix

const (
DLT_HHDLC = 0x79
IFF_SMART = 0x20
IFT_1822 = 0x2
IFT_A12MPPSWITCH = 0x82
@@ -210,13 +211,18 @@ const (
IFT_XETHER = 0x1a
IPPROTO_MAXID = 0x34
IPV6_FAITH = 0x1d
IPV6_MIN_MEMBERSHIPS = 0x1f
IP_FAITH = 0x16
IP_MAX_SOURCE_FILTER = 0x400
IP_MIN_MEMBERSHIPS = 0x1f
MAP_NORESERVE = 0x40
MAP_RENAME = 0x20
NET_RT_MAXID = 0x6
RTF_PRCLONING = 0x10000
RTM_OLDADD = 0x9
RTM_OLDDEL = 0xa
RT_CACHING_CONTEXT = 0x1
RT_NORTREF = 0x2
SIOCADDRT = 0x8040720a
SIOCALIFADDR = 0x8118691b
SIOCDELRT = 0x8040720b
17 changes: 17 additions & 0 deletions unix/errors_freebsd_arm64.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
// them here for backwards compatibility.

package unix

const (
DLT_HHDLC = 0x79
IPV6_MIN_MEMBERSHIPS = 0x1f
IP_MAX_SOURCE_FILTER = 0x400
IP_MIN_MEMBERSHIPS = 0x1f
RT_CACHING_CONTEXT = 0x1
RT_NORTREF = 0x2
)
2 changes: 1 addition & 1 deletion unix/mkall.sh
Original file line number Diff line number Diff line change
@@ -124,7 +124,7 @@ freebsd_arm)
freebsd_arm64)
mkerrors="$mkerrors -m64"
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;;
netbsd_386)
mkerrors="$mkerrors -m32"
Loading

0 comments on commit 5766fd3

Please sign in to comment.