struct hostent *gethostent(void)
{
	static struct hostent hoste;
	static char *buf = NULL;
	struct hostent *host = NULL;
#ifndef __UCLIBC_HAS_IPV6__
 #define HOSTENT_BUFSZ	(sizeof(struct in_addr) + sizeof(struct in_addr *) * 2 + \
			sizeof(char *)*ALIAS_DIM + BUFSZ /*namebuffer*/ + 2 /* margin */)
#else
 #define HOSTENT_BUFSZ	(sizeof(struct in6_addr) + sizeof(struct in6_addr *) * 2 + \
			sizeof(char *)*ALIAS_DIM + BUFSZ /*namebuffer*/ + 2 /* margin */)
#endif /* __UCLIBC_HAS_IPV6__ */

	__INIT_GETXX_BUF(HOSTENT_BUFSZ);
	gethostent_r(&hoste, buf, HOSTENT_BUFSZ, &host, &h_errno);
	return host;
}
struct hostent *gethostent(void)
{
	static struct hostent hoste;
	static char *buf = NULL;
	struct hostent *host = NULL;
#ifndef __UCLIBC_HAS_IPV6__
 #define HOSTENT_BUFSZ	(sizeof(struct in_addr) + sizeof(struct in_addr *) * 2 + \
			sizeof(char *)*ALIAS_DIM + BUFSZ   + 2  )
#else
 #define HOSTENT_BUFSZ	(sizeof(struct in6_addr) + sizeof(struct in6_addr *) * 2 + \
			sizeof(char *)*ALIAS_DIM + BUFSZ   + 2  )
#endif  

	__INIT_GETXX_BUF(HOSTENT_BUFSZ);
	gethostent_r(&hoste, buf, HOSTENT_BUFSZ, &host, &h_errno);
	return host;
}