summaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/sys/unix/sockcmsg_unix.go')
-rw-r--r--vendor/golang.org/x/sys/unix/sockcmsg_unix.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
index 5f9ae233a..062bcabab 100644
--- a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
+++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
@@ -18,15 +18,18 @@ func cmsgAlignOf(salen int) int {
salign := SizeofPtr
switch runtime.GOOS {
- case "darwin", "dragonfly", "solaris":
- // NOTE: It seems like 64-bit Darwin, DragonFly BSD and
- // Solaris kernels still require 32-bit aligned access to
- // network subsystem.
+ case "aix":
+ // There is no alignment on AIX.
+ salign = 1
+ case "darwin", "dragonfly", "solaris", "illumos":
+ // NOTE: It seems like 64-bit Darwin, DragonFly BSD,
+ // illumos, and Solaris kernels still require 32-bit
+ // aligned access to network subsystem.
if SizeofPtr == 8 {
salign = 4
}
- case "openbsd":
- // OpenBSD armv7 requires 64-bit alignment.
+ case "netbsd", "openbsd":
+ // NetBSD and OpenBSD armv7 require 64-bit alignment.
if runtime.GOARCH == "arm" {
salign = 8
}