diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-07-21 20:31:07 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-07-21 20:31:07 +0000 |
commit | cd00c91710b73b0df56825d976bbacb980e919d0 (patch) | |
tree | a6381c91e68034b9170051aa06589c0383d28f2f /lib/libc | |
parent | dbb3973392e51aa8cdd5ba00d465b6355c2bdde9 (diff) |
long stuff; netbsd
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/net/ns_addr.c | 7 | ||||
-rw-r--r-- | lib/libc/net/ns_ntoa.c | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/libc/net/ns_addr.c b/lib/libc/net/ns_addr.c index 9a4483a2097..8f2e4bc513c 100644 --- a/lib/libc/net/ns_addr.c +++ b/lib/libc/net/ns_addr.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: ns_addr.c,v 1.3 1997/07/09 01:08:41 millert Exp $"; +static char rcsid[] = "$OpenBSD: ns_addr.c,v 1.4 1997/07/21 20:31:05 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -45,7 +45,8 @@ static char rcsid[] = "$OpenBSD: ns_addr.c,v 1.3 1997/07/09 01:08:41 millert Exp static struct ns_addr addr, zero_addr; -static void Field(), cvtbase(); +static void Field __P((char *, u_int8_t *, int)); +static void cvtbase __P((long, int, int[], int, u_int8_t[], int)); struct ns_addr ns_addr(name) @@ -89,7 +90,7 @@ ns_addr(name) Field(socketname, (u_char *)&addr.x_port, 2); } - Field(hostname, addr.x_host.c_host, 6); + Field(hostname, (u_char *)addr.x_host.c_host, 6); return (addr); } diff --git a/lib/libc/net/ns_ntoa.c b/lib/libc/net/ns_ntoa.c index 472675e0667..ec03ba0dee2 100644 --- a/lib/libc/net/ns_ntoa.c +++ b/lib/libc/net/ns_ntoa.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: ns_ntoa.c,v 1.5 1997/07/09 01:08:43 millert Exp $"; +static char rcsid[] = "$OpenBSD: ns_ntoa.c,v 1.6 1997/07/21 20:31:06 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -46,7 +46,7 @@ ns_ntoa(addr) struct ns_addr addr; { static char obuf[40]; - union { union ns_net net_e; u_long long_e; } net; + union { union ns_net net_e; u_int32_t long_e; } net; in_port_t port = htons(addr.x_port); register char *cp; char *cp2; @@ -54,7 +54,7 @@ ns_ntoa(addr) u_char *uplim = up + 6; net.net_e = addr.x_net; - sprintf(obuf, "%x", ntohl(net.long_e)); + sprintf(obuf, "%lx", ntohl(net.long_e)); cp = spectHex(obuf); cp2 = cp + 1; while (*up==0 && up < uplim) up++; |