summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordt <dt@FreeBSD.org>1999-06-07 16:30:27 +0000
committerdt <dt@FreeBSD.org>1999-06-07 16:30:27 +0000
commit1149f9c0c03c2747fd7d1216884ec8694768b9e7 (patch)
tree93beee7a289d34747233cde0d1433dc00fd20099 /lib
parentbb3080b84d578420d338dce2d7c475e540858ed9 (diff)
downloadFreeBSD-src-1149f9c0c03c2747fd7d1216884ec8694768b9e7.zip
FreeBSD-src-1149f9c0c03c2747fd7d1216884ec8694768b9e7.tar.gz
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 *.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/net/gethostbyht.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/net/gethostbyht.c b/lib/libc/net/gethostbyht.c
index cf12f57..0e24042 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 <sys/param.h>
@@ -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;
OpenPOWER on IntegriCloud