From abd02d7387069439373d40c2f9afba93c76df650 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 8 Oct 2003 19:35:20 +0000 Subject: Atsushi Nemoto writes: I found inappropriate data types are used in some places in networking codes. * tcp_seq is 32bit (u_long -> u_int32_t) * in_addt_t should be used for internet address (unsigned long -> in_addr_t) * socklen_t should be used for accept() This is a patch against uclibc-0.9.21 (can be applied for current CVS). 64bit platforms (sizeof(int)!=sizeof(long)) will need this. I believe this patch does not harm any 32bit platforms. --- libc/inet/inet_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libc/inet/inet_net.c') diff --git a/libc/inet/inet_net.c b/libc/inet/inet_net.c index b49a4b92d..74fa390ac 100644 --- a/libc/inet/inet_net.c +++ b/libc/inet/inet_net.c @@ -42,12 +42,12 @@ * The library routines call this routine to interpret * network numbers. */ -u_int32_t +in_addr_t inet_network(const char *cp) { - register u_long val, base, n; + register in_addr_t val, base, n; register char c; - u_long parts[4], *pp = parts; + in_addr_t parts[4], *pp = parts; register int i; again: -- cgit v1.2.3