From 8e5d5bf58aa4ad9ac638f0b6e6473b4b8e2dbe83 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Thu, 24 Nov 2011 11:31:35 +0100 Subject: [PATCH] ws2_32: Pass NULL nodename on to native getaddrinfo. --- dlls/ws2_32/socket.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 72e2a5f72e2..cf33400a797 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -4824,14 +4824,15 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr if (!nodename && !servname) return WSAHOST_NOT_FOUND; if (!nodename) - node = "localhost"; + node = NULL; else if (!nodename[0]) + { node = hostname = get_hostname(); + if (!node) return WSA_NOT_ENOUGH_MEMORY; + } else node = nodename; - if (!node) return WSA_NOT_ENOUGH_MEMORY; - if (hints) { punixhints = &unixhints;