blob: f1839f7e6f69515e78ea84da6b230f3ec4b9f14b [file] [log] [blame]
Matt Kraaic55b8d42001-05-16 15:40:51 +00001/* vi: set sw=4 ts=4: */
2/*
3 * Mini xgethostbyname implementation.
4 *
Matt Kraaic55b8d42001-05-16 15:40:51 +00005 * Copyright (C) 2001 Matt Kraai <kraai@alumni.carnegiemellon.edu>.
6 *
"Robert P. J. Day"5d8843e2006-07-10 11:41:19 +00007 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
Matt Kraaic55b8d42001-05-16 15:40:51 +00008 */
9
Denis Vlasenkoe3241842007-08-13 10:36:25 +000010//#include <netdb.h>
Matt Kraai8f7a4ad2001-05-16 17:05:03 +000011#include "libbb.h"
12
Denis Vlasenkodefc1ea2008-06-27 02:52:20 +000013struct hostent* FAST_FUNC xgethostbyname(const char *name)
Matt Kraaic55b8d42001-05-16 15:40:51 +000014{
Denis Vlasenko5e618ff2006-11-21 20:35:22 +000015 struct hostent *retval = gethostbyname(name);
16 if (!retval)
Manuel Novoa III cad53642003-03-19 09:13:01 +000017 bb_herror_msg_and_die("%s", name);
Matt Kraaic55b8d42001-05-16 15:40:51 +000018 return retval;
19}