1
0
mirror of https://github.com/golang/go synced 2024-10-03 18:21:21 -06:00

net: fix cgoAddrInfoFlags() on FreeBSD

CL 6250075 removed AI_MASK mask on all BSD variants,
        however FreeBSD's AI_MASK does not include AI_V4MAPPED
        and AI_ALL, and its libc is strict about the ai_flags.

        This will fix the FreeBSD builder.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6305054
This commit is contained in:
Shenghou Ma 2012-06-06 22:03:31 +08:00
parent 81368d9bb9
commit 58993e514e

View File

@ -12,5 +12,5 @@ package net
import "C"
func cgoAddrInfoFlags() C.int {
return C.AI_CANONNAME | C.AI_V4MAPPED | C.AI_ALL
return (C.AI_CANONNAME | C.AI_V4MAPPED | C.AI_ALL) & C.AI_MASK
}