From 141894af60d45eb962587ffdc4b576146dc3ee7a Mon Sep 17 00:00:00 2001 From: Dmitrij Tejblum Date: Mon, 7 Jun 1999 16:30:27 +0000 Subject: [PATCH] Ensure that host_addr (which is returned in struct hostent::h_addr_list[0]) is aligned so that pointer to it can be safely casted to struct in_addr *. --- lib/libc/net/gethostbyht.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/net/gethostbyht.c b/lib/libc/net/gethostbyht.c index cf12f576e8f..0e24042b98c 100644 --- a/lib/libc/net/gethostbyht.c +++ b/lib/libc/net/gethostbyht.c @@ -53,7 +53,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93"; -static char rcsid[] = "$Id: gethostbyht.c,v 1.9 1997/02/22 15:00:07 peter Exp $"; +static char rcsid[] = "$Id: gethostbyht.c,v 1.10 1997/06/27 08:22:01 peter Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -74,7 +74,7 @@ static struct hostent host; static char *host_aliases[MAXALIASES]; static char hostbuf[BUFSIZ+1]; static FILE *hostf = NULL; -static u_char host_addr[16]; /* IPv4 or IPv6 */ +static u_int32_t host_addr[4]; /* IPv4 or IPv6 */ static char *h_addr_ptrs[2]; static int stayopen = 0;