From: Shenghou Ma Date: Wed, 6 Jun 2012 14:03:31 +0000 (+0800) Subject: net: fix cgoAddrInfoFlags() on FreeBSD X-Git-Tag: go1.1rc2~2983 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=58993e514ec8ee306b305df7db761f73ae522d3a;p=gostls13.git 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 --- diff --git a/src/pkg/net/cgo_bsd.go b/src/pkg/net/cgo_bsd.go index cf9cabbfeb..3b38e3d83e 100644 --- a/src/pkg/net/cgo_bsd.go +++ b/src/pkg/net/cgo_bsd.go @@ -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 }