diff options
author | Mikio Hara <mikioh.mikioh@gmail.com> | 2012-01-20 08:33:37 +0900 |
---|---|---|
committer | Mikio Hara <mikioh.mikioh@gmail.com> | 2012-01-20 08:33:37 +0900 |
commit | 7f4936a1c5d828b39efea48787bb266f4666d95c (patch) | |
tree | 2da53a2c84dc4126ec16610fe9b9cd84d37a8b96 | |
parent | 743c2d0f48ce54c4a885561cd6c21d2245d705c9 (diff) | |
download | go-7f4936a1c5d828b39efea48787bb266f4666d95c.tar.gz go-7f4936a1c5d828b39efea48787bb266f4666d95c.zip |
net: fix windows build
R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/5532102
-rw-r--r-- | src/pkg/net/fd_windows.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/net/fd_windows.go b/src/pkg/net/fd_windows.go index 637510b732..6e37b4eb6f 100644 --- a/src/pkg/net/fd_windows.go +++ b/src/pkg/net/fd_windows.go @@ -230,7 +230,7 @@ type netFD struct { // immutable until Close sysfd syscall.Handle family int - proto int + sotype int net string laddr Addr raddr Addr @@ -244,11 +244,11 @@ type netFD struct { wio sync.Mutex } -func allocFD(fd syscall.Handle, family, proto int, net string) (f *netFD) { +func allocFD(fd syscall.Handle, family, sotype int, net string) (f *netFD) { f = &netFD{ sysfd: fd, family: family, - proto: proto, + sotype: sotype, net: net, } runtime.SetFinalizer(f, (*netFD).Close) @@ -506,7 +506,7 @@ func (fd *netFD) accept(toAddr func(syscall.Sockaddr) Addr) (nfd *netFD, err err // Get new socket. // See ../syscall/exec.go for description of ForkLock. syscall.ForkLock.RLock() - s, e := syscall.Socket(fd.family, fd.proto, 0) + s, e := syscall.Socket(fd.family, fd.sotype, 0) if e != nil { syscall.ForkLock.RUnlock() return nil, e @@ -546,7 +546,7 @@ func (fd *netFD) accept(toAddr func(syscall.Sockaddr) Addr) (nfd *netFD, err err lsa, _ := lrsa.Sockaddr() rsa, _ := rrsa.Sockaddr() - nfd = allocFD(s, fd.family, fd.proto, fd.net) + nfd = allocFD(s, fd.family, fd.sotype, fd.net) nfd.setAddr(toAddr(lsa), toAddr(rsa)) return nfd, nil } |