From a34e9553db1e492c9a76e60db2296ae7e5fbb772 Mon Sep 17 00:00:00 2001 From: Benny Siegert Date: Thu, 28 Feb 2019 13:11:59 +0100 Subject: [PATCH] unix: use 64-bit alignment on netbsd-arm This is the same change as CL 164458. netbsd-arm needs the same override to the alignment function as openbsd-arm. This fixes the TestPassFD failure. Update golang/go#24771 Change-Id: I9c6451feb11ec9810de9273b1324b0c23d7e6d11 Reviewed-on: https://go-review.googlesource.com/c/164497 Reviewed-by: Tobias Klauser --- unix/sockcmsg_unix.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/sockcmsg_unix.go b/unix/sockcmsg_unix.go index 5f9ae233..26e8b36c 100644 --- a/unix/sockcmsg_unix.go +++ b/unix/sockcmsg_unix.go @@ -25,8 +25,8 @@ func cmsgAlignOf(salen int) int { 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 }