From 649c7b6daca6e29a719c9d29c65148a4628e729f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aram=20H=C4=83v=C4=83rneanu?= Date: Mon, 30 Mar 2015 23:07:18 +0200 Subject: [PATCH] net: add cgo support for Solaris Change-Id: Ib66bebd418d97f38956970f93e69aa41e7c55523 Reviewed-on: https://go-review.googlesource.com/8262 Reviewed-by: Minux Ma Reviewed-by: Mikio Hara --- src/net/cgo_solaris.go | 15 +++++++++++++++ src/net/cgo_unix.go | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 src/net/cgo_solaris.go diff --git a/src/net/cgo_solaris.go b/src/net/cgo_solaris.go new file mode 100644 index 0000000000..2d452b9e17 --- /dev/null +++ b/src/net/cgo_solaris.go @@ -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 +*/ +import "C" + +const cgoAddrInfoFlags = C.AI_CANONNAME | C.AI_V4MAPPED | C.AI_ALL diff --git a/src/net/cgo_unix.go b/src/net/cgo_unix.go index 7f7b600003..34588a3baa 100644 --- a/src/net/cgo_unix.go +++ b/src/net/cgo_unix.go @@ -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