Commit 1ea17d6c authored by Mikio Hara's avatar Mikio Hara

ipv4: rename freebsd32o64 with compatFreeBSD32 for consistency

The variable name compatFreeBSD32 refers to the kernel configuration
directive COMPAT_FREEBSD32 and is also used in route and ipv4 packages.

Change-Id: Ia6f123833af0c11398f46dfa31c3e5c5ab121fc0
Reviewed-on: https://go-review.googlesource.com/c/149878Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent d76a1902
......@@ -50,7 +50,7 @@ func init() {
archs, _ := syscall.Sysctl("kern.supported_archs")
for _, s := range strings.Fields(archs) {
if s == "amd64" {
freebsd32o64 = true
compatFreeBSD32 = true
break
}
}
......
......@@ -13,7 +13,7 @@ import (
"golang.org/x/net/internal/socket"
)
var freebsd32o64 bool
var compatFreeBSD32 bool // 386 emulation on amd64
func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
var gr groupReq
......@@ -22,7 +22,7 @@ func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) e
}
gr.setGroup(grp)
var b []byte
if freebsd32o64 {
if compatFreeBSD32 {
var d [sizeofGroupReq + 4]byte
s := (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))
copy(d[:4], s[:4])
......@@ -41,7 +41,7 @@ func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, sr
}
gsr.setSourceGroup(grp, src)
var b []byte
if freebsd32o64 {
if compatFreeBSD32 {
var d [sizeofGroupSourceReq + 4]byte
s := (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))
copy(d[:4], s[:4])
......
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