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:
Joel Sing 2013-07-16 08:35:06 -07:00 committed by Ian Lance Taylor
parent 5d363c6357
commit 9bd32b48ca
1 changed files with 1 additions and 1 deletions

View File

@ -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))
}