Commit e147a913 authored by Joel Sing's avatar Joel Sing Committed by Brad Fitzpatrick

internal/socket: use correct cmsg alignment for openbsd/arm

The OpenBSD armv7 port requires 64-bit alignment for cmsgs.

Change-Id: Ibb1c5dc32c9e0851d0ee23b4ebdb316d7ed79629
Reviewed-on: https://go-review.googlesource.com/c/154397Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 891ebc4b
...@@ -6,9 +6,15 @@ ...@@ -6,9 +6,15 @@
package socket package socket
import "unsafe" import (
"runtime"
"unsafe"
)
func probeProtocolStack() int { func probeProtocolStack() int {
if runtime.GOOS == "openbsd" && runtime.GOARCH == "arm" {
return 8
}
var p uintptr var p uintptr
return int(unsafe.Sizeof(p)) return int(unsafe.Sizeof(p))
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment