]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: remove getsockname workaround for openbsd
authorJoel Sing <jsing@google.com>
Mon, 13 Jan 2014 00:24:56 +0000 (11:24 +1100)
committerJoel Sing <jsing@google.com>
Mon, 13 Jan 2014 00:24:56 +0000 (11:24 +1100)
Remove the getsockname workaround for unix domain sockets on OpenBSD.
This was fixed in OpenBSD 5.2 and we now have a minimum requirement
for OpenBSD 5.4-current.

R=golang-codereviews, minux.ma
CC=golang-codereviews
https://golang.org/cl/50960043

src/pkg/syscall/syscall_bsd.go

index fce764028b7917ce884c32eb7953b3c504bec80e..a62cbe283595af79eeb5af42fc1f4e0e3a1a307b 100644 (file)
@@ -296,10 +296,9 @@ func Getsockname(fd int) (sa Sockaddr, err error) {
        if err = getsockname(fd, &rsa, &len); err != nil {
                return
        }
-       // TODO(jsing): Remove after OpenBSD 5.4 is released (see issue 3349).
-       // TODO(jsing): Apparently dragonfly has the same "bug", which should
-       // be reported upstream.
-       if (runtime.GOOS == "dragonfly" || runtime.GOOS == "openbsd") && rsa.Addr.Family == AF_UNSPEC && rsa.Addr.Len == 0 {
+       // TODO(jsing): DragonFly has a "bug" (see issue 3349), which should be
+       // reported upstream.
+       if runtime.GOOS == "dragonfly" && rsa.Addr.Family == AF_UNSPEC && rsa.Addr.Len == 0 {
                rsa.Addr.Family = AF_UNIX
                rsa.Addr.Len = SizeofSockaddrUnix
        }