diff options
author | 1997-04-03 05:52:35 +0000 | |
---|---|---|
committer | 1997-04-03 05:52:35 +0000 | |
commit | 11fca95d3f3256b88499230bb1e4c120700491d6 (patch) | |
tree | 11bddb3e25780b54eb0b3c9839b8bf2ce612b7f2 /lib/libc | |
parent | 10 X's for mktemp() and mkstemp(). (diff) | |
download | wireguard-openbsd-11fca95d3f3256b88499230bb1e4c120700491d6.tar.xz wireguard-openbsd-11fca95d3f3256b88499230bb1e4c120700491d6.zip |
ensure host_addr[] remains nicely aligned; pr#145, grr@shandakor.tharsis.com
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/net/gethostnamadr.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc/net/gethostnamadr.c b/lib/libc/net/gethostnamadr.c index cfa58123540..e26ae989c50 100644 --- a/lib/libc/net/gethostnamadr.c +++ b/lib/libc/net/gethostnamadr.c @@ -52,7 +52,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.15 1997/04/02 08:22:35 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.16 1997/04/03 05:52:35 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -88,7 +88,11 @@ static char *__ypdomain; static struct hostent host; static char *host_aliases[MAXALIASES]; static char hostbuf[BUFSIZ+1]; -static u_char host_addr[16]; /* IPv4 or IPv6 */ +static union { + struct in_addr _host_in_addr; + u_char _host_addr[16]; /* IPv4 or IPv6 */ +} _host_addr_u; +#define host_addr _host_addr_u._host_addr static FILE *hostf = NULL; static int stayopen = 0; |