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
5e59e853
Commit
5e59e853
authored
Jan 19, 2012
by
Mikio Hara
Committed by
Brad Fitzpatrick
Jan 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: fix linux build
R=golang-dev, bradfitz CC=golang-dev
https://golang.org/cl/5558056
parent
8d6958fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
src/pkg/net/unicast_test.go
src/pkg/net/unicast_test.go
+11
-6
No files found.
src/pkg/net/unicast_test.go
View file @
5e59e853
...
...
@@ -5,6 +5,7 @@
package
net
import
(
"io"
"runtime"
"testing"
)
...
...
@@ -33,24 +34,27 @@ func TestUnicastTCPAndUDP(t *testing.T) {
if
tt
.
ipv6
&&
!
supportsIPv6
{
continue
}
var
fd
*
netFD
var
(
fd
*
netFD
closer
io
.
Closer
)
if
!
tt
.
packet
{
if
tt
.
laddr
==
"previous"
{
tt
.
laddr
=
prevladdr
}
c
,
err
:=
Listen
(
tt
.
net
,
tt
.
laddr
)
l
,
err
:=
Listen
(
tt
.
net
,
tt
.
laddr
)
if
err
!=
nil
{
t
.
Fatalf
(
"Listen failed: %v"
,
err
)
}
prevladdr
=
c
.
Addr
()
.
String
()
defer
c
.
Close
()
fd
=
c
.
(
*
TCPListener
)
.
fd
prevladdr
=
l
.
Addr
()
.
String
()
closer
=
l
fd
=
l
.
(
*
TCPListener
)
.
fd
}
else
{
c
,
err
:=
ListenPacket
(
tt
.
net
,
tt
.
laddr
)
if
err
!=
nil
{
t
.
Fatalf
(
"ListenPacket failed: %v"
,
err
)
}
defer
c
.
Close
()
closer
=
c
fd
=
c
.
(
*
UDPConn
)
.
fd
}
if
!
tt
.
ipv6
{
...
...
@@ -58,6 +62,7 @@ func TestUnicastTCPAndUDP(t *testing.T) {
}
else
{
testIPv6UnicastSocketOptions
(
t
,
fd
)
}
closer
.
Close
()
}
}
...
...
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