Try inet_addr() before gethostbyname().

gethostbyname() is not required to accept an IP address and does not do
so on the Wii.