summaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go')
-rw-r--r--vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go
index 57a0021da..0840fe4a5 100644
--- a/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go
+++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin freebsd linux netbsd openbsd solaris
+//go:build aix || darwin || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin freebsd linux netbsd openbsd solaris zos
package unix
@@ -36,6 +37,10 @@ func cmsgAlignOf(salen int) int {
if runtime.GOOS == "netbsd" && runtime.GOARCH == "arm64" {
salign = 16
}
+ case "zos":
+ // z/OS socket macros use [32-bit] sizeof(int) alignment,
+ // not pointer width.
+ salign = SizeofInt
}
return (salen + salign - 1) & ^(salign - 1)