diff options
author | Phil Blundell <philb@gnu.org> | 2003-10-19 11:57:37 +0000 |
---|---|---|
committer | Phil Blundell <philb@gnu.org> | 2003-10-19 11:57:37 +0000 |
commit | 2085dd68b3face369a72f4fd9e492a943f52f277 (patch) | |
tree | e0f3db8d5b41998b260a6dfe32554598a89e2b26 /lib | |
parent | Maik Broemme contributed gcc warning fixes (break after default: label) (diff) | |
download | net-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |