]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* nss/nss_files/files-ethers.c (ntohost): Fix db key.
authorRoland McGrath <roland@gnu.org>
Tue, 2 Jul 1996 19:42:29 +0000 (19:42 +0000)
committerRoland McGrath <roland@gnu.org>
Tue, 2 Jul 1996 19:42:29 +0000 (19:42 +0000)
ChangeLog
nss/nss_files/files-ethers.c
stdio-common/tst-ungetc.c

index 0a6586f43cec318a7a6f5337fd7691f24beea250..2e7b1a433c6aafb4bbf8083dc2aca589bab8a432 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 Tue Jul  2 10:44:37 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>
 
+       * nss/nss_files/files-ethers.c (ntohost): Fix db key.
+
        * nss/nss_files/files-network.c: Pass empty for new DB_LOOKUP args.
        (DATABASE): Define this instead of DATAFILE.
        * nss/nss_files/files-hosts.c: Likewise.
index 70f7d07dbda7711f89ead641aa070b694276f8fa..290d931c9712a7a17c11a410bf3f8b58448f795e 100644 (file)
@@ -64,8 +64,10 @@ DB_LOOKUP (hostton, 1 + strlen (name), (".%s", name),
               break;
           }, const char *name)
 
-DB_LOOKUP (ntohost, 7, ("=%c%c%c%c%c%c",
-                       addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]),
+DB_LOOKUP (ntohost, 18, ("=%x:%x:%x:%x:%x:%x",
+                        addr->ether_addr_octet[0], addr->ether_addr_octet[1],
+                        addr->ether_addr_octet[2], addr->ether_addr_octet[3],
+                        addr->ether_addr_octet[4], addr->ether_addr_octet[5]),
           {
             if (memcmp (&result->e_addr, addr,
                         sizeof (struct ether_addr)) == 0)
index 67c45d4028394018cf017649eec5a60da2e1594e..ba74a84f7f015b0f683578da71f57c8340f4a389 100644 (file)
@@ -1,6 +1,7 @@
 /* Test for ungetc bugs.  */
 
 #include <stdio.h>
+#include <unistd.h>
 
 #define assert(x) \
   if (!(x)) \