gethostbyname(my_name) and IL2-Sturmovik CONTINUED

Dan Kegel dank at
Fri Apr 20 08:37:33 CDT 2007

Briareos wrote:
> The Problem: gethostbyname(own_name) always returns ...
> To me it's logical that you get when pinging your local hostname,
> but if windows does give the IP of your NIC then wine should do as well - as
> we want to reach compatibility.
>If, on the other hand, you say it's simply bad programming done by the
>app-developer if he tries to fetch the IP of the NIC that way, I'd say let's
>still comply to it, because its more likely than having a programmer
>expecting to get when asking for "localhostname".

My understanding is that hostnames are not really hostnames, but
interface names.
On Unix, is never normally returned unless you ask for
literally "localhost".  I suspect Windows behaves like Unix here.
So this probably is a valid bug in wine.

(I suspect that the app developer is misguided, because binding
to just one interface doesn't work well if you have multiple
interfaces, but that's neither here nor there.)
- Dan

More information about the wine-devel mailing list