http://bugs.winehq.org/show_bug.cgi?id=32412
--- Comment #11 from Bruno Jesus 00cpxxx@gmail.com 2013-07-29 19:29:20 CDT --- (In reply to comment #10)
I hope you also handle the protocol set to zero case because that seems not to be required for bug 30815.
The only protocol supported by SOCK_STREAM is IPPROTO_TCP that's why you can use zero as protocol and it works on both win/*nix.
The problem here is that WSADuplicateSocket is not filling the LPWSAPROTOCOL_INFO structure correctly.