1
0
mirror of https://github.com/golang/go synced 2024-10-05 06:11:21 -06:00
go/src/pkg/net/cgo_bsd.go
Shenghou Ma 58993e514e 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
2012-06-06 22:03:31 +08:00

17 lines
335 B
Go

// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin freebsd
package net
/*
#include <netdb.h>
*/
import "C"
func cgoAddrInfoFlags() C.int {
return (C.AI_CANONNAME | C.AI_V4MAPPED | C.AI_ALL) & C.AI_MASK
}