From 12500544f89f9420afe9529ba8940bf72d294972 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 16 Apr 2019 10:13:38 +0200 Subject: [PATCH] unix: fix cmsg alignment on aix This was missing from CL 171941. Change-Id: I14f16355b2fe18103d2713faf2bebf004248fc0c Reviewed-on: https://go-review.googlesource.com/c/sys/+/172257 Run-TryBot: Tobias Klauser Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- unix/sockcmsg_unix.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unix/sockcmsg_unix.go b/unix/sockcmsg_unix.go index 26e8b36c..723b7f10 100644 --- a/unix/sockcmsg_unix.go +++ b/unix/sockcmsg_unix.go @@ -18,6 +18,9 @@ func cmsgAlignOf(salen int) int { salign := SizeofPtr switch runtime.GOOS { + case "aix": + // There is no alignment on AIX. + salign = 1 case "darwin", "dragonfly", "solaris": // NOTE: It seems like 64-bit Darwin, DragonFly BSD and // Solaris kernels still require 32-bit aligned access to