blob: 83d5386699e6dac1e50d1fda906b206fa31d7c22 [file] [log] [blame]
Eric Andersen51b8bd62002-07-03 11:46:38 +00001/* vi: set sw=4 ts=4: */
2/*
3 * Mini xgethostbyname2 implementation.
4 *
"Robert P. J. Day"5d8843e2006-07-10 11:41:19 +00005 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
Eric Andersen51b8bd62002-07-03 11:46:38 +00006 */
7
8#include <netdb.h>
9#include "libbb.h"
10
11
Glenn L McGrathd7fb1b32002-11-26 02:40:56 +000012#ifdef CONFIG_FEATURE_IPV6
Eric Andersen51b8bd62002-07-03 11:46:38 +000013struct hostent *xgethostbyname2(const char *name, int af)
14{
15 struct hostent *retval;
16
17 if ((retval = gethostbyname2(name, af)) == NULL)
Manuel Novoa III cad53642003-03-19 09:13:01 +000018 bb_herror_msg_and_die("%s", name);
Eric Andersen51b8bd62002-07-03 11:46:38 +000019
20 return retval;
21}
22#endif