summaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/sys/unix/mkpost.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2019-06-16 23:33:25 +0200
committerGitHub <noreply@github.com>2019-06-16 23:33:25 +0200
commitcb712ff37d3c20a21695e00c52fff213a6fd40b4 (patch)
tree0ba0ee4f55bf6ace2656562465cc82d807e741b9 /vendor/golang.org/x/sys/unix/mkpost.go
parentf4ae61044888f591830e6c1be9a2bdb14f88943e (diff)
downloadmatterbridge-msglm-cb712ff37d3c20a21695e00c52fff213a6fd40b4.tar.gz
matterbridge-msglm-cb712ff37d3c20a21695e00c52fff213a6fd40b4.tar.bz2
matterbridge-msglm-cb712ff37d3c20a21695e00c52fff213a6fd40b4.zip
Update vendor (#852)
Diffstat (limited to 'vendor/golang.org/x/sys/unix/mkpost.go')
-rw-r--r--vendor/golang.org/x/sys/unix/mkpost.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/golang.org/x/sys/unix/mkpost.go b/vendor/golang.org/x/sys/unix/mkpost.go
index 9feddd00..4d5b531b 100644
--- a/vendor/golang.org/x/sys/unix/mkpost.go
+++ b/vendor/golang.org/x/sys/unix/mkpost.go
@@ -42,6 +42,13 @@ func main() {
log.Fatal(err)
}
+ if goos == "aix" {
+ // Replace type of Atim, Mtim and Ctim by Timespec in Stat_t
+ // to avoid having both StTimespec and Timespec.
+ sttimespec := regexp.MustCompile(`_Ctype_struct_st_timespec`)
+ b = sttimespec.ReplaceAll(b, []byte("Timespec"))
+ }
+
// 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}"))
@@ -96,6 +103,15 @@ func main() {
cgoCommandRegex := regexp.MustCompile(`(cgo -godefs .*)`)
b = cgoCommandRegex.ReplaceAll(b, []byte(replacement))
+ // Rename Stat_t time fields
+ if goos == "freebsd" && goarch == "386" {
+ // Hide Stat_t.[AMCB]tim_ext fields
+ renameStatTimeExtFieldsRegex := regexp.MustCompile(`[AMCB]tim_ext`)
+ b = renameStatTimeExtFieldsRegex.ReplaceAll(b, []byte("_"))
+ }
+ renameStatTimeFieldsRegex := regexp.MustCompile(`([AMCB])(?:irth)?time?(?:spec)?\s+(Timespec|StTimespec)`)
+ b = renameStatTimeFieldsRegex.ReplaceAll(b, []byte("${1}tim ${2}"))
+
// gofmt
b, err = format.Source(b)
if err != nil {