ws2_32: Update WS_get_local_ips to not return a bogus IP address.

Joachim Priesner joachim.priesner at
Tue Nov 24 16:55:11 CST 2015

Am Dienstag, 24. November 2015 schrieb Jamie Taylor:
> Is the resulting list of addresses supposed to contain loopback addresses?
> (I.e., does it on Windows?  I don't have a Windows machine on which to
> test.)

It seems that this is the case -- gethostbyname(gethostname()) returned as the only address in a VMware VM with network adapters removed.

Currently, Wine does not seem to replicate that behavior. I have been watching this for some time, as I use an application that crashes for this reason -- unless an Ethernet cable is plugged in, gethostbyname(gethostname()) returns NULL on Wine (which the native Linux version of gethostbyname also does, for that matter). I haven't dug into ws2_32 enough to be able to fix this, but if there is to be a Definitive Fix(TM) for this function, this behavior should probably be looked at.


More information about the wine-devel mailing list