Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
01ef823c
Commit
01ef823c
authored
Nov 14, 2013
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: On Solaris use Darwin keepalive code.
From-SVN: r204819
parent
4699e99a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
27 deletions
+2
-27
libgo/Makefile.am
+1
-1
libgo/Makefile.in
+1
-1
libgo/go/net/tcpsockopt_solaris.go
+0
-25
No files found.
libgo/Makefile.am
View file @
01ef823c
...
...
@@ -752,7 +752,7 @@ if LIBGO_IS_DARWIN
go_net_tcpsockopt_file
=
go/net/tcpsockopt_darwin.go
else
if
LIBGO_IS_SOLARIS
go_net_tcpsockopt_file
=
go/net/tcpsockopt_
solaris
.go
go_net_tcpsockopt_file
=
go/net/tcpsockopt_
darwin
.go
else
go_net_tcpsockopt_file
=
go/net/tcpsockopt_unix.go
endif
...
...
libgo/Makefile.in
View file @
01ef823c
...
...
@@ -996,7 +996,7 @@ go_mime_files = \
@LIBGO_IS_LINUX_FALSE@
go_net_cloexec_file
=
go/net/sys_cloexec.go
@LIBGO_IS_LINUX_TRUE@
go_net_cloexec_file
=
go/net/sock_cloexec.go
@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_OPENBSD_FALSE@@LIBGO_IS_SOLARIS_FALSE@
go_net_tcpsockopt_file
=
go/net/tcpsockopt_unix.go
@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_OPENBSD_FALSE@@LIBGO_IS_SOLARIS_TRUE@
go_net_tcpsockopt_file
=
go/net/tcpsockopt_
solaris
.go
@LIBGO_IS_DARWIN_FALSE@@LIBGO_IS_OPENBSD_FALSE@@LIBGO_IS_SOLARIS_TRUE@
go_net_tcpsockopt_file
=
go/net/tcpsockopt_
darwin
.go
@LIBGO_IS_DARWIN_TRUE@@LIBGO_IS_OPENBSD_FALSE@
go_net_tcpsockopt_file
=
go/net/tcpsockopt_darwin.go
@LIBGO_IS_OPENBSD_TRUE@
go_net_tcpsockopt_file
=
go/net/tcpsockopt_openbsd.go
go_net_files
=
\
...
...
libgo/go/net/tcpsockopt_solaris.go
deleted
100644 → 0
View file @
4699e99a
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
net
import
(
"os"
"syscall"
"time"
)
// Set keep alive period.
func
setKeepAlivePeriod
(
fd
*
netFD
,
d
time
.
Duration
)
error
{
if
err
:=
fd
.
incref
();
err
!=
nil
{
return
err
}
defer
fd
.
decref
()
// The kernel expects milliseconds so round to next highest millisecond.
d
+=
(
time
.
Millisecond
-
time
.
Nanosecond
)
msecs
:=
int
(
d
.
Nanoseconds
()
/
time
.
Millisecond
)
return
os
.
NewSyscallError
(
"setsockopt"
,
syscall
.
SetsockoptInt
(
fd
.
sysfd
,
syscall
.
IPPROTO_TCP
,
syscall
.
TCP_KEEPALIVE_THRESHOLD
,
msecs
))
}
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