blob: 9446daba7de857a278e50aa30849040a1a443493 [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 *
Denys Vlasenko0ef64bd2010-08-16 20:14:46 +02007 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
Matt Kraaic55b8d42001-05-16 15:40:51 +00008 */
Matt Kraai8f7a4ad2001-05-16 17:05:03 +00009#include "libbb.h"
10
Denis Vlasenkodefc1ea2008-06-27 02:52:20 +000011struct hostent* FAST_FUNC xgethostbyname(const char *name)
Matt Kraaic55b8d42001-05-16 15:40:51 +000012{
Denis Vlasenko5e618ff2006-11-21 20:35:22 +000013 struct hostent *retval = gethostbyname(name);
14 if (!retval)
James Byrne69374872019-07-02 11:35:03 +020015 bb_simple_herror_msg_and_die(name);
Matt Kraaic55b8d42001-05-16 15:40:51 +000016 return retval;
17}