[Wine] getaddrinfo confusion (wine 1.5.5)
Emanuel Rietveld
codehotter at gmail.com
Fri Jun 1 08:28:30 CDT 2012
On 06/01/2012 03:14 PM, lahmbi5678 wrote:
> Hi,
>
> still I'm just guessing, but what does your hosts file look like, how would your hostname be resolved, if you tried to ping it? Maybe wine expects some domain name in hosts, so that "seo" would become e.g. "seo.yourdomain.com".
>
I'm really glad that you're helping me guess, I'm guessing too! My
hostfile is correct and I can ping seo by short name. It is not a FQDN.
If I calling getaddrinfo with those same parameters in a test program,
it returns success.
The game calls WS2_32::getaddrinfo in wine with nodename = "" and
service is "0". Wine turns this into nodename = "seo" (my hostname) and
service is "0", leaving the addrinfo structure the same.
Then wine calls
result = getaddrinfo("seo", "0", pUnixhints, res);
which results in result = -2 (EAI_NONAME)
If I write a test program like this
// includes omitted
int main (int argc, int argv) {
struct addrinfo unixhints, *res;
// initialization of unixhints omitted, same as in wine
result = getaddrinfo("seo", "0", &unixhits, &res);
printf("%d", result);
return result;
}
results in result = 0 (success).
How can wine get a different result from my test program?
More information about the wine-users
mailing list