diff options
author | deraadt <> | 1997-04-03 05:52:35 +0000 |
---|---|---|
committer | deraadt <> | 1997-04-03 05:52:35 +0000 |
commit | ab0aad2af12f864d48a64c7f39cdc2e1f6f7a9ee (patch) | |
tree | 9d59dec163fbb3ce73816b9224ea50c39a4d724c /src/lib | |
parent | ccb1db54d45b97082406e2af284bcc19f4a36b15 (diff) | |
download | openbsd-ab0aad2af12f864d48a64c7f39cdc2e1f6f7a9ee.tar.gz openbsd-ab0aad2af12f864d48a64c7f39cdc2e1f6f7a9ee.tar.bz2 openbsd-ab0aad2af12f864d48a64c7f39cdc2e1f6f7a9ee.zip |
ensure host_addr[] remains nicely aligned; pr#145, grr@shandakor.tharsis.com
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libc/net/gethostnamadr.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/libc/net/gethostnamadr.c b/src/lib/libc/net/gethostnamadr.c index cfa5812354..e26ae989c5 100644 --- a/src/lib/libc/net/gethostnamadr.c +++ b/src/lib/libc/net/gethostnamadr.c | |||
@@ -52,7 +52,7 @@ | |||
52 | */ | 52 | */ |
53 | 53 | ||
54 | #if defined(LIBC_SCCS) && !defined(lint) | 54 | #if defined(LIBC_SCCS) && !defined(lint) |
55 | static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.15 1997/04/02 08:22:35 deraadt Exp $"; | 55 | static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.16 1997/04/03 05:52:35 deraadt Exp $"; |
56 | #endif /* LIBC_SCCS and not lint */ | 56 | #endif /* LIBC_SCCS and not lint */ |
57 | 57 | ||
58 | #include <sys/param.h> | 58 | #include <sys/param.h> |
@@ -88,7 +88,11 @@ static char *__ypdomain; | |||
88 | static struct hostent host; | 88 | static struct hostent host; |
89 | static char *host_aliases[MAXALIASES]; | 89 | static char *host_aliases[MAXALIASES]; |
90 | static char hostbuf[BUFSIZ+1]; | 90 | static char hostbuf[BUFSIZ+1]; |
91 | static u_char host_addr[16]; /* IPv4 or IPv6 */ | 91 | static union { |
92 | struct in_addr _host_in_addr; | ||
93 | u_char _host_addr[16]; /* IPv4 or IPv6 */ | ||
94 | } _host_addr_u; | ||
95 | #define host_addr _host_addr_u._host_addr | ||
92 | static FILE *hostf = NULL; | 96 | static FILE *hostf = NULL; |
93 | static int stayopen = 0; | 97 | static int stayopen = 0; |
94 | 98 | ||