]> Cypherpunks repositories - gostls13.git/commitdiff
net: fix Windows build
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 20 Dec 2011 22:32:33 +0000 (14:32 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 20 Dec 2011 22:32:33 +0000 (14:32 -0800)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5505048

src/pkg/net/fd.go
src/pkg/net/net.go

index 5318c51c9a2d7142a8f96a4fa3aa76789a5000ad..bcd04a0ad878af8d1dc8f8e044346c30c02515b9 100644 (file)
@@ -377,14 +377,6 @@ func (fd *netFD) CloseWrite() error {
        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
index 48f0ae791c85f3591b3732eabab588df14bb48ed..b236dfdb1dd81ae5daa50537485a521da4cf6702 100644 (file)
@@ -157,6 +157,14 @@ func (e *OpError) Timeout() bool {
        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