diff options
| author | Peter Wemm <peter@FreeBSD.org> | 1998-06-12 13:04:59 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 1998-06-12 13:04:59 +0000 |
| commit | 28faa5304b96ed4156e2fccba89f82af9057cd70 (patch) | |
| tree | 1821c039fc3eb2c26cac243c8a1c850313155584 | |
| parent | a60c62a3c092de7bc1fa01f72f1399fd5064596e (diff) | |
Notes
| -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) |
