diff options
| -rw-r--r-- | usr.bin/ypwhich/ypwhich.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ypwhich/ypwhich.c b/usr.bin/ypwhich/ypwhich.c index e56462775be5..763875f5e6bd 100644 --- a/usr.bin/ypwhich/ypwhich.c +++ b/usr.bin/ypwhich/ypwhich.c @@ -29,12 +29,14 @@ #ifndef lint static const char rcsid[] = - "$Id$"; + "$Id: ypwhich.c,v 1.9 1997/08/29 11:56:51 charnier Exp $"; #endif /* not lint */ #include <sys/param.h> #include <sys/types.h> #include <sys/socket.h> +#include <netinet/in.h> +#include <arpa/inet.h> #include <ctype.h> #include <err.h> #include <netdb.h> @@ -93,7 +95,7 @@ struct sockaddr_in *sin; struct timeval tv; CLIENT *client; int sock, r; - u_long ss_addr; + struct in_addr ss_addr; sock = RPC_ANYSOCK; tv.tv_sec = 15; @@ -122,7 +124,7 @@ struct sockaddr_in *sin; } clnt_destroy(client); - ss_addr = *(u_long *)ypbr.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_addr; + ss_addr = *(struct in_addr *)ypbr.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_addr; /*printf("%08x\n", ss_addr);*/ hent = gethostbyaddr((char *)&ss_addr, sizeof(ss_addr), AF_INET); if (hent) |
