Commit 3233a12f authored by Joel Sing's avatar Joel Sing

syscall: remove getsockname workaround for openbsd

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
parent 073bd0ba
......@@ -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
}
......
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