gethostbyname failing for 127.0.0.1 or localhost? I'm speechless. Something is wrong. Could you write a quick program that calls gethostbyname("localhost"), gethostbyname("127.0.0.1") and maybe some other hosts that should be found to make sure that gethostbyname does in fact work? I'm thinking that maybe the string containing the host name isn't being passed correctly (pointer problem of some sort?), but that doesn't seem very likely. The only reason I'm even thinking this is because you mentioned you had trouble printing out the worldaddress string.
Another thing you could try is running strace on it (I think strace zone should work). Maybe even cause the program to exit when that error occurs so you can clearly see the strace leading up to it. That might give some more insight into why it's failing.
|