summaryrefslogtreecommitdiff
path: root/libgo/go/syscall/sockcmsg_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/syscall/sockcmsg_unix.go')
-rw-r--r--libgo/go/syscall/sockcmsg_unix.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/libgo/go/syscall/sockcmsg_unix.go b/libgo/go/syscall/sockcmsg_unix.go
index 75273e338c0..dd74417708e 100644
--- a/libgo/go/syscall/sockcmsg_unix.go
+++ b/libgo/go/syscall/sockcmsg_unix.go
@@ -18,15 +18,18 @@ func cmsgAlignOf(salen int) int {
salign := int(sizeofPtr)
switch runtime.GOOS {
- case "darwin", "dragonfly", "solaris":
+ case "aix":
+ // There is no alignment on AIX.
+ salign = 1
+ case "darwin", "dragonfly", "illumos", "solaris":
// NOTE: It seems like 64-bit Darwin, DragonFly BSD 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
}