Reentrant version of gethostbyname. Format #include <netdb.h> int gethostbyname_r(const char *name, struct hostent *ret, char *buffer, size_t buflen, struct hostent **result, int *h_errnop);