aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2003-10-19 11:57:37 +0000
committerPhil Blundell <philb@gnu.org>2003-10-19 11:57:37 +0000
commit2085dd68b3face369a72f4fd9e492a943f52f277 (patch)
treee0f3db8d5b41998b260a6dfe32554598a89e2b26 /lib
parentMaik Broemme contributed gcc warning fixes (break after default: label) (diff)
downloadnet-tools-2085dd68b3face369a72f4fd9e492a943f52f277.tar.gz
net-tools-2085dd68b3face369a72f4fd9e492a943f52f277.tar.bz2
net-tools-2085dd68b3face369a72f4fd9e492a943f52f277.zip
fix portability problem on 64-bit big endian.
patch from Mads Martin Joergensen <mmj@suse.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/inet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/inet.c b/lib/inet.c
index ae90664..c0f7efa 100644
--- a/lib/inet.c
+++ b/lib/inet.c
@@ -3,7 +3,7 @@
* support functions for the net-tools.
* (NET-3 base distribution).
*
- * Version: $Id: inet.c,v 1.13 1999/12/11 13:35:56 freitag Exp $
+ * Version: $Id: inet.c,v 1.14 2003/10/19 11:57:37 pb Exp $
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993 MicroWalt Corporation
@@ -144,7 +144,7 @@ static int INET_rresolve(char *name, size_t len, struct sockaddr_in *sin,
struct hostent *ent;
struct netent *np;
struct addr *pn;
- unsigned long ad, host_ad;
+ u_int32_t ad, host_ad;
int host = 0;
/* Grmpf. -FvK */
@@ -155,7 +155,7 @@ static int INET_rresolve(char *name, size_t len, struct sockaddr_in *sin,
errno = EAFNOSUPPORT;
return (-1);
}
- ad = (unsigned long) sin->sin_addr.s_addr;
+ ad = sin->sin_addr.s_addr;
#ifdef DEBUG
fprintf (stderr, "rresolve: %08lx, mask %08x, num %08x \n", ad, netmask, numeric);
#endif