Commit 5ac8a444 authored by Tobias Klauser's avatar Tobias Klauser Committed by Tobias Klauser

unix: export FdSet bits field on freebsd

After CL 136816 the bits member of the FdSet struct is no longer
exported. Make sure to retain it in mkpost.go and rename it to Bits
as on all other systems.

Change-Id: I860b307a80c7e29b4a75d9d916d879ee0a31c014
Reviewed-on: https://go-review.googlesource.com/c/149897
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarYuval Pavel Zholkover <paulzhol@gmail.com>
Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 66b7b131
......@@ -46,6 +46,10 @@ func main() {
valRegex := regexp.MustCompile(`type (Fsid|Sigset_t) struct {(\s+)X__val(\s+\S+\s+)}`)
b = valRegex.ReplaceAll(b, []byte("type $1 struct {${2}Val$3}"))
// Intentionally export __fds_bits field in FdSet
fdSetRegex := regexp.MustCompile(`type (FdSet) struct {(\s+)X__fds_bits(\s+\S+\s+)}`)
b = fdSetRegex.ReplaceAll(b, []byte("type $1 struct {${2}Bits$3}"))
// If we have empty Ptrace structs, we should delete them. Only s390x emits
// nonempty Ptrace structs.
ptraceRexexp := regexp.MustCompile(`type Ptrace((Psw|Fpregs|Per) struct {\s*})`)
......
......@@ -339,7 +339,7 @@ type Kevent_t struct {
}
type FdSet struct {
_ [32]uint32
Bits [32]uint32
}
const (
......
......@@ -337,7 +337,7 @@ type Kevent_t struct {
}
type FdSet struct {
_ [16]uint64
Bits [16]uint64
}
const (
......
......@@ -337,7 +337,7 @@ type Kevent_t struct {
}
type FdSet struct {
_ [32]uint32
Bits [32]uint32
}
const (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment