diff options
Diffstat (limited to 'sysdeps/posix/getaddrinfo.c')
-rw-r--r-- | sysdeps/posix/getaddrinfo.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index b4d408d5d4..9b66676e1c 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; |