diff options
| author | Bill Fenner <fenner@FreeBSD.org> | 2003-01-05 14:05:24 +0000 |
|---|---|---|
| committer | Bill Fenner <fenner@FreeBSD.org> | 2003-01-05 14:05:24 +0000 |
| commit | a6497df52c6a659b192b85f4f36dbb1e54d76eb6 (patch) | |
| tree | 01bf18a1845002800351a576c4624ac80adb545f /lib/libc | |
| parent | 2b0e59768268fc87dd4e84fff881df8ec3ecbb8a (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/net/gethostbynis.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/net/gethostbynis.c b/lib/libc/net/gethostbynis.c index ad336fcd3753..73b12edbc15b 100644 --- a/lib/libc/net/gethostbynis.c +++ b/lib/libc/net/gethostbynis.c @@ -67,6 +67,7 @@ _gethostbynis(name, map, af) static struct hostent h; static char *domain = (char *)NULL; static char ypbuf[YPMAXRECORD + 2]; + in_addr_t addr; switch(af) { case AF_INET: @@ -104,7 +105,8 @@ _gethostbynis(name, map, af) *cp++ = '\0'; h.h_addr_list = host_addrs; h.h_addr = hostaddr; - *((u_long *)h.h_addr) = inet_addr(result); + addr = inet_addr(result); + bcopy((char *)&addr, h.h_addr, size); h.h_length = size; h.h_addrtype = AF_INET; while (*cp == ' ' || *cp == '\t') |
