]> Cypherpunks repositories - gostls13.git/commitdiff
net: add cgo support for Solaris
authorAram Hăvărneanu <aram@mgk.ro>
Mon, 30 Mar 2015 21:07:18 +0000 (23:07 +0200)
committerAram Hăvărneanu <aram@mgk.ro>
Wed, 6 May 2015 11:37:55 +0000 (11:37 +0000)
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>
src/net/cgo_solaris.go [new file with mode: 0644]
src/net/cgo_unix.go

diff --git a/src/net/cgo_solaris.go b/src/net/cgo_solaris.go
new file mode 100644 (file)
index 0000000..2d452b9
--- /dev/null
@@ -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
index 7f7b6000034c273a1bfba113a35ddc1334f73fa5..34588a3baaafba0d9a3ed1ba98b35c44796b05cd 100644 (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