diff options
author | Brad Fitzpatrick <bradfitz@golang.org> | 2015-12-17 08:04:21 -0800 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2015-12-17 16:06:58 +0000 |
commit | 8cdd7d14ac67706163fb91055fb5aba16f6c7f3e (patch) | |
tree | 3414f1dec9fc9b839f88b374c0e887a63e2e780b | |
parent | 53a207131d7487d8d1d8658341a2c9f5bbb4bcfe (diff) | |
download | go-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.go | 3 | ||||
-rw-r--r-- | src/net/hook_unix.go | 6 |
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 |