[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FTP broken
Brian A May <bmay@dgs.monash.edu.au> writes:
> Hence, my guess is that the supplied inet_ntop_v4 is broken for little
> endian systems????
Yes, I think you're entirely correct. Can you try the following
patch?
/assar
Index: lib/roken/inet_ntop.c
===================================================================
RCS file: /afs/pdc.kth.se/src/packages/kth-krb/SourceRepository/lib/roken/inet_ntop.c,v
retrieving revision 1.1
diff -u -w -u -w -r1.1 inet_ntop.c
--- inet_ntop.c 1999/07/26 10:11:45 1.1
+++ inet_ntop.c 1999/08/05 09:52:50
@@ -70,7 +70,7 @@
const char digits[] = "0123456789";
int i;
struct in_addr *addr = (struct in_addr *)src;
- u_long a = addr->s_addr;
+ u_long a = ntohl(addr->s_addr);
const char *orig_dst = dst;
if (size < INET_ADDRSTRLEN) {