ws2_32: getaddrinfo(NULL, "", ...) on OS X.

David Nadlinger code at
Thu Feb 2 09:37:08 CST 2012

If getaddrinfo() is passed a null host and an empty port string, it 
still resolves to on Windows and Linux, but fails on 
OS X. The added workaround (rewriting the port to "0") works on both 
Linux and OS X.

Tested on OS X 10.7.2, Arch Linux (Kernel 3.1.4, glibc 2.14.1) and 
Ubuntu Oneric, and verified against Windows Server 2008 R2.

See for a detailed comparison of the 
edge case behavior on the different OSes.
  dlls/ws2_32/socket.c     |    9 +++++++--
  dlls/ws2_32/tests/sock.c |    6 ++++++
  2 files changed, 13 insertions(+), 2 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-ws2_32-getaddrinfo-NULL-.-on-OS-X.patch
Type: text/x-patch
Size: 1851 bytes
Desc: not available
URL: <>

More information about the wine-patches mailing list