gethostbyname() and gethostbyaddr() use a different set of error codes than POSIX netdb.h. Some OSes define the error numbers such that error codes conflict between the two sets. Hence keep the sets separate.