summaryrefslogtreecommitdiff
path: root/src/net/cgo_stub.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/cgo_stub.go')
-rw-r--r--src/net/cgo_stub.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/net/cgo_stub.go b/src/net/cgo_stub.go
new file mode 100644
index 000000000..f533c1421
--- /dev/null
+++ b/src/net/cgo_stub.go
@@ -0,0 +1,25 @@
+// 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 !cgo netgo
+
+// Stub cgo routines for systems that do not use cgo to do network lookups.
+
+package net
+
+func cgoLookupHost(name string) (addrs []string, err error, completed bool) {
+ return nil, nil, false
+}
+
+func cgoLookupPort(network, service string) (port int, err error, completed bool) {
+ return 0, nil, false
+}
+
+func cgoLookupIP(name string) (addrs []IP, err error, completed bool) {
+ return nil, nil, false
+}
+
+func cgoLookupCNAME(name string) (cname string, err error, completed bool) {
+ return "", nil, false
+}