Problem with "gethostbyname" method

When I use the “gethostbyname” method to get the IP Address of the
local system given the name of the machine, I get “host name lookup
failure”.

What configuration do I need on the local machine to make sure this
works properly??

Paul