]> Cypherpunks repositories - gostls13.git/commitdiff
net: fix setsockopt for openbsd
authorJoel Sing <jsing@google.com>
Tue, 16 Jul 2013 15:35:06 +0000 (08:35 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 16 Jul 2013 15:35:06 +0000 (08:35 -0700)
s/TCP_KEEPALIVE/SO_KEEPALIVE/ to unbreak build on OpenBSD.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/11345044

src/pkg/net/tcpsockopt_openbsd.go

index 25a826f18b7d93b58bd7505c46fe0bbc76a21cb6..306f4e050d278f9bddebed1165d859cb7f3d25ff 100644 (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))
 }