From f1a785acbf05051be4963474f2307aad77fff16b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Jan 2000 06:53:09 +0000 Subject: Update. * sysdeps/posix/getaddrinfo.c (gaih_local): If name is given and AI_NUMERICHOST flag is set, return an error. Patch by Hideaki YOSHIFUJI . --- sysdeps/posix/getaddrinfo.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sysdeps') diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index b4d408d..9b66676 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -124,6 +124,9 @@ gaih_local (const char *name, const struct gaih_service *service, { struct utsname utsname; + if ((name != NULL) && (req->ai_flags & AI_NUMERICHOST)) + return GAIH_OKIFUNSPEC | -EAI_NONAME; + if ((name != NULL) || (req->ai_flags & AI_CANONNAME)) if (uname (&utsname)) return -EAI_SYSTEM; -- cgit v1.1