aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2015-12-17 08:04:21 -0800
committerBrad Fitzpatrick <bradfitz@golang.org>2015-12-17 16:06:58 +0000
commit8cdd7d14ac67706163fb91055fb5aba16f6c7f3e (patch)
tree3414f1dec9fc9b839f88b374c0e887a63e2e780b
parent53a207131d7487d8d1d8658341a2c9f5bbb4bcfe (diff)
downloadgo-8cdd7d14ac67706163fb91055fb5aba16f6c7f3e.tar.gz
go-8cdd7d14ac67706163fb91055fb5aba16f6c7f3e.zip
net: fix build
https://golang.org/cl/16953 broke the world. Change-Id: I7cbd4105338ff896bd0c8f69a0b126b6272be2e5 Reviewed-on: https://go-review.googlesource.com/17914 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-rw-r--r--src/net/hook.go3
-rw-r--r--src/net/hook_unix.go6
2 files changed, 5 insertions, 4 deletions
diff --git a/src/net/hook.go b/src/net/hook.go
index 81e061f372..9ab34c0e36 100644
--- a/src/net/hook.go
+++ b/src/net/hook.go
@@ -4,11 +4,8 @@
package net
-import "time"
-
var (
testHookDialTCP = dialTCP
- testHookDNSDialer = func(d time.Duration) dnsDialer { return &Dialer{Timeout: d} }
testHookHostsPath = "/etc/hosts"
testHookLookupIP = func(fn func(string) ([]IPAddr, error), host string) ([]IPAddr, error) { return fn(host) }
testHookSetKeepAlive = func() {}
diff --git a/src/net/hook_unix.go b/src/net/hook_unix.go
index 361ca5980c..15c6a18a8a 100644
--- a/src/net/hook_unix.go
+++ b/src/net/hook_unix.go
@@ -6,10 +6,14 @@
package net
-import "syscall"
+import (
+ "syscall"
+ "time"
+)
var (
testHookDialChannel = func() {} // see golang.org/issue/5349
+ testHookDNSDialer = func(d time.Duration) dnsDialer { return &Dialer{Timeout: d} }
// Placeholders for socket system calls.
socketFunc func(int, int, int) (int, error) = syscall.Socket