Page 1 of 1

[devkitPPC/libogc] net_gethostbyname does not work with IPs

Posted: Thu Jun 13, 2013 1:59 am
by Midar
When trying to use net_gethostbyname() with an IP, it returns a resolve error.

This not only means that you have to check whether the address is an IP first and then use inet_addr(), it also means it breaks with how gethostbyname() works on any other OS, thus making ports unnecessarily hard. Strictly speaking, this is not required by POSIX, though, but everyone pretty much assumes it accepts IPs.