net: fix Windows build
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5505048
diff --git a/src/pkg/net/fd.go b/src/pkg/net/fd.go
index 5318c51..bcd04a0 100644
--- a/src/pkg/net/fd.go
+++ b/src/pkg/net/fd.go
@@ -377,14 +377,6 @@
return fd.shutdown(syscall.SHUT_WR)
}
-type timeoutError struct{}
-
-func (e *timeoutError) Error() string { return "i/o timeout" }
-func (e *timeoutError) Timeout() bool { return true }
-func (e *timeoutError) Temporary() bool { return true }
-
-var errTimeout error = &timeoutError{}
-
func (fd *netFD) Read(p []byte) (n int, err error) {
if fd == nil {
return 0, os.EINVAL
diff --git a/src/pkg/net/net.go b/src/pkg/net/net.go
index 48f0ae7..b236dfd 100644
--- a/src/pkg/net/net.go
+++ b/src/pkg/net/net.go
@@ -157,6 +157,14 @@
return ok && t.Timeout()
}
+type timeoutError struct{}
+
+func (e *timeoutError) Error() string { return "i/o timeout" }
+func (e *timeoutError) Timeout() bool { return true }
+func (e *timeoutError) Temporary() bool { return true }
+
+var errTimeout error = &timeoutError{}
+
type AddrError struct {
Err string
Addr string