]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: use 64-bit alignment on netbsd-arm
authorBenny Siegert <bsiegert@gmail.com>
Thu, 28 Feb 2019 10:54:22 +0000 (11:54 +0100)
committerTobias Klauser <tobias.klauser@gmail.com>
Thu, 28 Feb 2019 11:24:52 +0000 (11:24 +0000)
netbsd-arm needs the same override to the alignment function as
openbsd-arm. This fixes the TestPassFD failure.

Update golang/go#24771

Change-Id: Ib124fc776f6e2e3b3932784365c2bd3944523a52
Reviewed-on: https://go-review.googlesource.com/c/164458
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/syscall/sockcmsg_unix.go

index 954148012fac1c6645a114379ea678c773e42479..fa198686b168b57be04f8c98ae149a069caae7c3 100644 (file)
@@ -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
                }