syscall: workaround accept() bug on Darwin
syscall: workaround accept() bug on Darwin

Darwin kernels have a bug in accept() where error result from
an internal call is not checked and socket is accepted instead
of ECONNABORTED error. However, such sockets have no sockaddr,
which results in EAFNOSUPPORT error from anyToSockaddr, making
Go http servers running on Mac OS X easily susceptible to
denial of service from simple port scans with nmap.
Fixes issue 3849.

R=golang-dev, adg, mikioh.mikioh
CC=golang-dev
http://codereview.appspot.com/6456045

Committer: Andrew Gerrand <395a7d33bec8475c9b83b7d440f141bcbd994aa5@golang.org>

wesolows/golang,wesolows/golang,firebitsbr/golang-old,wesolows/golang,wesolows/golang,wesolows/golang-old,wesolows/golang-old,wesolows/golang,firebitsbr/golang-old,firebitsbr/golang-old,wesolows/golang-old,wesolows/golang-old,wesolows/golang-old,firebitsbr/golang-old,firebitsbr/golang-old,wesolows/golang-old,firebitsbr/golang-old,wesolows/golang-old,firebitsbr/golang-old,firebitsbr/golang-old,wesolows/golang,wesolows/golang