mirror of https://github.com/golang/go.git
net: fix setsockopt for openbsd
s/TCP_KEEPALIVE/SO_KEEPALIVE/ to unbreak build on OpenBSD. R=golang-dev, iant CC=golang-dev https://golang.org/cl/11345044
This commit is contained in:
parent
5d363c6357
commit
9bd32b48ca
|
|
@ -23,5 +23,5 @@ func setKeepAlivePeriod(fd *netFD, d time.Duration) error {
|
|||
d += (time.Second - time.Nanosecond)
|
||||
secs := int(d.Seconds())
|
||||
|
||||
return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd.sysfd, syscall.IPPROTO_TCP, syscall.TCP_KEEPALIVE, secs))
|
||||
return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd.sysfd, syscall.IPPROTO_TCP, syscall.SO_KEEPALIVE, secs))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue