Commit 9bd32b48 authored by Joel Sing's avatar Joel Sing Committed by Ian Lance Taylor

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
parent 5d363c63
......@@ -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))
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment