1
0
mirror of https://github.com/golang/go synced 2024-11-17 21:04:43 -07:00

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>
This commit is contained in:
Brad Fitzpatrick 2015-12-17 08:04:21 -08:00
parent 53a207131d
commit 8cdd7d14ac
2 changed files with 5 additions and 4 deletions

View File

@ -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() {}

View File

@ -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