Commit 617fbc82 authored by Mikio Hara's avatar Mikio Hara

ipv6: 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 ipv6 packages.

Change-Id: I00e6de390c25b7df45b76e772719a83fa6b0843b
Reviewed-on: https://go-review.googlesource.com/c/149879Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 1ea17d6c
......@@ -51,7 +51,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