about summary refs log tree commit diff
path: root/nss/nss_files/files-hosts.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss/nss_files/files-hosts.c')
-rw-r--r--nss/nss_files/files-hosts.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/nss/nss_files/files-hosts.c b/nss/nss_files/files-hosts.c
index e26d3fa03b..d6dd6daea7 100644
--- a/nss/nss_files/files-hosts.c
+++ b/nss/nss_files/files-hosts.c
@@ -98,6 +98,13 @@ DB_LOOKUP (hostbyname, ,,
 	   LOOKUP_NAME (h_name, h_aliases),
 	   const char *name)
 
+DB_LOOKUP (hostbyname2, ,,
+	   {
+	     if (result->h_addrtype != af)
+	       continue;
+	     LOOKUP_NAME (h_name, h_aliases)
+	   }, const char *name, int af)
+
 DB_LOOKUP (hostbyaddr, ,,
 	   {
 	     if (result->h_addrtype == type && result->h_length == len &&