[Wine] Re: gethostbyname(my_name) and IL2-Sturmovik

Pavel Troller patrol at sinus.cz
Tue Dec 13 00:04:28 CST 2005

> Ok, I've just checked doing the same thing under windows.
> The test(ripdaveno is the name of the Computer I tested on):
> {
> ...
> hostent* h = gethostbyname("ripdaveno"); 
> char* str = inet_ntoa(*((in_addr*)h->h_addr_list[0]));
> ...
> }
> The string in str was "" which is my Network IP-Adress.  With 
> wine(under Linux), as far as I've tested it, exactly the same code always 
> generates "".
> Since Wine tries to simulate Windows as exactly as possible, this is wrong. 
> So, in my opinion this Patch is necessary. :-)
  It's strange but there is no patch in this mail I can look at...
  However, even more strange is that wine returns localhost address to you...
Why ? I just tested Your testing code (just slightly modified to get it to
compile) on both plain linux as well as in wine and in both cases it returns my
real public IP. Isn't your Linux networking setup (/etc/hosts table) a bit
wrong ? My one contains (arcus is my machine name)	localhost	arcus.sinus.cz arcus

  I have already seen broken setups containing things like	localhost arcus

  which is of course wrong.
                         Regards, Pavel Troller

More information about the wine-users mailing list