mirror of
https://github.com/golang/net.git
synced 2026-03-31 18:37:08 +09:00
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/154397 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
891ebc4b82
commit
e147a91383
@@ -6,9 +6,15 @@
|
||||
|
||||
package socket
|
||||
|
||||
import "unsafe"
|
||||
import (
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func probeProtocolStack() int {
|
||||
if runtime.GOOS == "openbsd" && runtime.GOARCH == "arm" {
|
||||
return 8
|
||||
}
|
||||
var p uintptr
|
||||
return int(unsafe.Sizeof(p))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user