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 <tobias.klauser@gmail.com>
diff --git a/unix/sockcmsg_unix.go b/unix/sockcmsg_unix.go
index 5f9ae23..26e8b36 100644
--- a/unix/sockcmsg_unix.go
+++ b/unix/sockcmsg_unix.go
@@ -25,8 +25,8 @@
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
}