net: add cgo support for Solaris

Change-Id: Ib66bebd418d97f38956970f93e69aa41e7c55523
Reviewed-on: https://go-review.googlesource.com/8262
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
This commit is contained in:
Aram Hăvărneanu 2015-03-30 23:07:18 +02:00
parent 24396dae67
commit 649c7b6dac
2 changed files with 16 additions and 1 deletions

15
src/net/cgo_solaris.go Normal file
View file

@ -0,0 +1,15 @@
// Copyright 2015 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 cgo,!netgo
package net
/*
#cgo LDFLAGS: -lsocket -lnsl
#include <netdb.h>
*/
import "C"
const cgoAddrInfoFlags = C.AI_CANONNAME | C.AI_V4MAPPED | C.AI_ALL

View file

@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// +build cgo,!netgo
// +build darwin dragonfly freebsd linux netbsd openbsd
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
package net