]> Cypherpunks repositories - gostls13.git/commitdiff
net: no AI_ALL on android
authorDavid Crawshaw <david.crawshaw@zentus.com>
Tue, 8 Jul 2014 17:42:14 +0000 (13:42 -0400)
committerDavid Crawshaw <david.crawshaw@zentus.com>
Tue, 8 Jul 2014 17:42:14 +0000 (13:42 -0400)
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/112800043

src/pkg/net/cgo_android.go [new file with mode: 0644]
src/pkg/net/cgo_linux.go

diff --git a/src/pkg/net/cgo_android.go b/src/pkg/net/cgo_android.go
new file mode 100644 (file)
index 0000000..3819ce5
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2014 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
+
+//#include <netdb.h>
+import "C"
+
+func cgoAddrInfoFlags() C.int {
+       return C.AI_CANONNAME
+}
index 693aef03d244301e60721ed715d35a61169c12bc..4ef2d0cd12c91d537be8321ab2ef0d98b37f513b 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build cgo,!netgo
+// +build !android,cgo,!netgo
 
 package net