diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index a6452491559e..475718ed72f9 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -1,4 +1,4 @@ -/* $NetBSD: getaddrinfo.c,v 1.105 2013/05/13 17:54:55 christos Exp $ */ +/* $NetBSD: getaddrinfo.c,v 1.106 2013/12/22 02:40:48 christos Exp $ */ /* $KAME: getaddrinfo.c,v 1.29 2000/08/31 17:26:57 itojun Exp $ */ /* @@ -55,7 +55,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: getaddrinfo.c,v 1.105 2013/05/13 17:54:55 christos Exp $"); +__RCSID("$NetBSD: getaddrinfo.c,v 1.106 2013/12/22 02:40:48 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -2121,6 +2121,7 @@ res_searchN(const char *name, struct res_target *target, res_state res) const char *cp, * const *domain; HEADER *hp; u_int dots; + char buf[MAXHOSTNAMELEN]; int trailing_dot, ret, saved_herrno; int got_nodata = 0, got_servfail = 0, tried_as_is = 0; @@ -2141,7 +2142,7 @@ res_searchN(const char *name, struct res_target *target, res_state res) /* * if there aren't any dots, it could be a user-level alias */ - if (!dots && (cp = __hostalias(name)) != NULL) { + if (!dots && (cp = res_hostalias(res, name, buf, sizeof(buf))) != NULL) { ret = res_queryN(cp, target, res); return ret; }