Skip to content

Commit

Permalink
unix: add solaris Iovec cleanup in mkpost.go
Browse files Browse the repository at this point in the history
Fixes golang/go#55997

Change-Id: Iaf1b90486c2b4c8227a81aa06abec8d26176566d
  • Loading branch information
nshalman committed Oct 2, 2022
1 parent f11e5e4 commit 7bb33b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions unix/mkpost.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ func main() {
})
}

if goos == "solaris" {
iovecspec := regexp.MustCompile(`_Ctype_struct_iovec`)
b = iovecspec.ReplaceAll(b, []byte("Iovec"))
}

// Intentionally export __val fields in Fsid and Sigset_t
valRegex := regexp.MustCompile(`type (Fsid|Sigset_t) struct {(\s+)X__(bits|val)(\s+\S+\s+)}`)
b = valRegex.ReplaceAll(b, []byte("type $1 struct {${2}Val$4}"))
Expand Down

0 comments on commit 7bb33b5

Please sign in to comment.