Skip to content

Commit 807c6c5

Browse files
committed
net: fix the build even harder
Should fix nacl. Follow-up to https://golang.org/cl/17936 (fix race) and https://golang.org/cl/17914 (fix build) for https://golang.org/cl/16953 (broke the build) Third time's a charm. Change-Id: I23930d5cff4235209546952ce2231f165ab5bf8a Reviewed-on: https://go-review.googlesource.com/17939 Run-TryBot: Brad Fitzpatrick <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent d270a67 commit 807c6c5

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/net/dnsclient_unix.go

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ type dnsDialer interface {
2929
dialDNS(string, string) (dnsConn, error)
3030
}
3131

32+
var testHookDNSDialer = func(d time.Duration) dnsDialer { return &Dialer{Timeout: d} }
33+
3234
// A dnsConn represents a DNS transport endpoint.
3335
type dnsConn interface {
3436
io.Closer

src/net/hook_unix.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@
66

77
package net
88

9-
import (
10-
"syscall"
11-
"time"
12-
)
9+
import "syscall"
1310

1411
var (
1512
testHookDialChannel = func() {} // see golang.org/issue/5349
16-
testHookDNSDialer = func(d time.Duration) dnsDialer { return &Dialer{Timeout: d} }
1713

1814
// Placeholders for socket system calls.
1915
socketFunc func(int, int, int) (int, error) = syscall.Socket

0 commit comments

Comments
 (0)