3
0

xgethostbyname2.c 422 B

12345678910111213141516171819202122
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * Mini xgethostbyname2 implementation.
  4. *
  5. * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  6. */
  7. #include <netdb.h>
  8. #include "libbb.h"
  9. #ifdef CONFIG_FEATURE_IPV6
  10. struct hostent *xgethostbyname2(const char *name, int af)
  11. {
  12. struct hostent *retval;
  13. if ((retval = gethostbyname2(name, af)) == NULL)
  14. bb_herror_msg_and_die("%s", name);
  15. return retval;
  16. }
  17. #endif