Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
7f4936a1
Commit
7f4936a1
authored
Jan 20, 2012
by
Mikio Hara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: fix windows build
R=golang-dev, alex.brainman CC=golang-dev
https://golang.org/cl/5532102
parent
743c2d0f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/pkg/net/fd_windows.go
src/pkg/net/fd_windows.go
+5
-5
No files found.
src/pkg/net/fd_windows.go
View file @
7f4936a1
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment