diff --git a/unix/mkpost.go b/unix/mkpost.go index 7938fe7b..c28e42b0 100644 --- a/unix/mkpost.go +++ b/unix/mkpost.go @@ -42,6 +42,10 @@ func main() { log.Fatal(err) } + // Intentionally export __val fields in Fsid and Sigset_t + 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}")) + // 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*})`) diff --git a/unix/ztypes_linux_386.go b/unix/ztypes_linux_386.go index edb49049..b07e0482 100644 --- a/unix/ztypes_linux_386.go +++ b/unix/ztypes_linux_386.go @@ -171,7 +171,7 @@ type Dirent struct { } type Fsid struct { - _ [2]int32 + Val [2]int32 } type Flock_t struct { @@ -739,7 +739,7 @@ const ( ) type Sigset_t struct { - _ [32]uint32 + Val [32]uint32 } const RNDGETENTCNT = 0x80045200 diff --git a/unix/ztypes_linux_amd64.go b/unix/ztypes_linux_amd64.go index 560f7a94..d6f20821 100644 --- a/unix/ztypes_linux_amd64.go +++ b/unix/ztypes_linux_amd64.go @@ -171,7 +171,7 @@ type Dirent struct { } type Fsid struct { - _ [2]int32 + Val [2]int32 } type Flock_t struct { @@ -757,7 +757,7 @@ const ( ) type Sigset_t struct { - _ [16]uint64 + Val [16]uint64 } const RNDGETENTCNT = 0x80045200 diff --git a/unix/ztypes_linux_arm.go b/unix/ztypes_linux_arm.go index 6b87d03d..0920891f 100644 --- a/unix/ztypes_linux_arm.go +++ b/unix/ztypes_linux_arm.go @@ -173,7 +173,7 @@ type Dirent struct { } type Fsid struct { - _ [2]int32 + Val [2]int32 } type Flock_t struct { @@ -728,7 +728,7 @@ const ( ) type Sigset_t struct { - _ [32]uint32 + Val [32]uint32 } const RNDGETENTCNT = 0x80045200 diff --git a/unix/ztypes_linux_arm64.go b/unix/ztypes_linux_arm64.go index d147de24..d35d5ba7 100644 --- a/unix/ztypes_linux_arm64.go +++ b/unix/ztypes_linux_arm64.go @@ -172,7 +172,7 @@ type Dirent struct { } type Fsid struct { - _ [2]int32 + Val [2]int32 } type Flock_t struct { @@ -736,7 +736,7 @@ const ( ) type Sigset_t struct { - _ [16]uint64 + Val [16]uint64 } const RNDGETENTCNT = 0x80045200 diff --git a/unix/ztypes_linux_mips.go b/unix/ztypes_linux_mips.go index 0051dc4d..f1006741 100644 --- a/unix/ztypes_linux_mips.go +++ b/unix/ztypes_linux_mips.go @@ -172,7 +172,7 @@ type Dirent struct { } type Fsid struct { - _ [2]int32 + Val [2]int32 } type Flock_t struct { @@ -733,7 +733,7 @@ const ( ) type Sigset_t struct { - _ [32]uint32 + Val [32]uint32 } const RNDGETENTCNT = 0x40045200 diff --git a/unix/ztypes_linux_mips64.go b/unix/ztypes_linux_mips64.go index a67fbb42..1bc01bdd 100644 --- a/unix/ztypes_linux_mips64.go +++ b/unix/ztypes_linux_mips64.go @@ -172,7 +172,7 @@ type Dirent struct { } type Fsid struct { - _ [2]int32 + Val [2]int32 } type Flock_t struct { @@ -738,7 +738,7 @@ const ( ) type Sigset_t struct { - _ [16]uint64 + Val [16]uint64 } const RNDGETENTCNT = 0x40045200 diff --git a/unix/ztypes_linux_mips64le.go b/unix/ztypes_linux_mips64le.go index 41bd0978..af22a07b 100644 --- a/unix/ztypes_linux_mips64le.go +++ b/unix/ztypes_linux_mips64le.go @@ -172,7 +172,7 @@ type Dirent struct { } type Fsid struct { - _ [2]int32 + Val [2]int32 } type Flock_t struct { @@ -738,7 +738,7 @@ const ( ) type Sigset_t struct { - _ [16]uint64 + Val [16]uint64 } const RNDGETENTCNT = 0x40045200 diff --git a/unix/ztypes_linux_mipsle.go b/unix/ztypes_linux_mipsle.go index 46fa3f9b..67ac81ed 100644 --- a/unix/ztypes_linux_mipsle.go +++ b/unix/ztypes_linux_mipsle.go @@ -172,7 +172,7 @@ type Dirent struct { } type Fsid struct { - _ [2]int32 + Val [2]int32 } type Flock_t struct { @@ -733,7 +733,7 @@ const ( ) type Sigset_t struct { - _ [32]uint32 + Val [32]uint32 } const RNDGETENTCNT = 0x40045200 diff --git a/unix/ztypes_linux_ppc64.go b/unix/ztypes_linux_ppc64.go index e5758703..0c3b0561 100644 --- a/unix/ztypes_linux_ppc64.go +++ b/unix/ztypes_linux_ppc64.go @@ -173,7 +173,7 @@ type Dirent struct { } type Fsid struct { - _ [2]int32 + Val [2]int32 } type Flock_t struct { @@ -746,7 +746,7 @@ const ( ) type Sigset_t struct { - _ [16]uint64 + Val [16]uint64 } const RNDGETENTCNT = 0x40045200 diff --git a/unix/ztypes_linux_ppc64le.go b/unix/ztypes_linux_ppc64le.go index b2a92611..03a721e0 100644 --- a/unix/ztypes_linux_ppc64le.go +++ b/unix/ztypes_linux_ppc64le.go @@ -173,7 +173,7 @@ type Dirent struct { } type Fsid struct { - _ [2]int32 + Val [2]int32 } type Flock_t struct { @@ -746,7 +746,7 @@ const ( ) type Sigset_t struct { - _ [16]uint64 + Val [16]uint64 } const RNDGETENTCNT = 0x40045200 diff --git a/unix/ztypes_linux_s390x.go b/unix/ztypes_linux_s390x.go index c56ac409..a0217ff5 100644 --- a/unix/ztypes_linux_s390x.go +++ b/unix/ztypes_linux_s390x.go @@ -172,7 +172,7 @@ type Dirent struct { } type Fsid struct { - _ [2]int32 + Val [2]int32 } type Flock_t struct { @@ -763,7 +763,7 @@ const ( ) type Sigset_t struct { - _ [16]uint64 + Val [16]uint64 } const RNDGETENTCNT = 0x80045200