> gethostbyname_r() should be useable from both threaded and non-threaded
Maybe i'm too dumb, but i don't get any good results, which
i was having with the use of gethostbyname().
This is my current usage:
from the function parameters is defined char *hostname.
struct hostent *host;
struct hostent **hstres;
The only parameter which is set is the hostname. And i'm not getting
any good results whith it.
it works "fine" when i'm using it with the old func.
But this giving me headache when i have more then one thread using
when i'm trying to access host->h_addr i'm getting a memory access
what have i to do that i have the correct values, which i normaly
have from host->h_addr and host->h_lenght ?
host = gethostbyname(hostname)
there i can then access the hostent fields normal.
to copy the adress of the host.