http://bugs.winehq.org/show_bug.cgi?id=8514
Summary: getsockname not bug compatible with windows? Product: Wine Version: 0.9.37. Platform: Other OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-net AssignedTo: wine-bugs@winehq.org ReportedBy: citizenr@gmail.com
http://msdn2.microsoft.com/en-us/library/ms738543.aspx
msdn: The getsockname function retrieves the current name for the specified socket
descriptor in
name. It is used on the bound or connected socket
_bound or connected socket_, but if you call it just after you tried to bind socket to XXXX port, and it Failed, it will
-XP SP2- return XXXX in sin_port sockaddr structure -Wine - return 0 in sin_port sockaddr structure