From: Russ Cox Date: Fri, 21 Sep 2012 19:54:19 +0000 (+1000) Subject: [release-branch.go1] syscall: apply comment from Mikioh X-Git-Tag: go1.0.3~129 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2ab2bfaf2faa15fbfe5e28a09a9b0e1124d48a9c;p=gostls13.git [release-branch.go1] syscall: apply comment from Mikioh ««« backport d191515c80fb syscall: apply comment from Mikioh This comment was suggested in CL 6456045 but never got applied. R=mikioh, mikioh.mikioh CC=golang-dev https://golang.org/cl/6447056 »»» --- diff --git a/src/pkg/syscall/syscall_bsd.go b/src/pkg/syscall/syscall_bsd.go index 1d873b69ac..37f01c886e 100644 --- a/src/pkg/syscall/syscall_bsd.go +++ b/src/pkg/syscall/syscall_bsd.go @@ -304,7 +304,7 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) { if err != nil { return } - if len == 0 { + if runtime.GOOS == "darwin" && len == 0 { // Accepted socket has no address. // This is likely due to a bug in xnu kernels, // where instead of ECONNABORTED error socket