gethostbyname(my_name) and IL2-Sturmovik
juan_lang at yahoo.com
Mon Dec 12 19:49:14 CST 2005
> The string in str was "192.168.2.75" which is my Network IP-Adress.
> With wine(under Linux), as far as I've tested it, exactly the same
> code always generates "127.0.0.1".
> Since Wine tries to simulate Windows as exactly as possible,
> this is wrong.
> So, in my opinion this Patch is necessary. :-)
You're right that Wine doesn't behave correctly in this case. The trouble
is your patch is rather ugly. First, the style isn't correct--no
C++-style comments, please, and make the indenting consistent. Second,
there's a leak in the code you wrote, the socket you open to do
SIOCGIFCONF on is never closed. It would be cleaner, in my opinion, to
use iphlpapi's GetAdaptersInfo, which already enumerates the public
(non-loopback) interfaces available on the system.
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
More information about the wine-devel