mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-15 23:05:49 +01:00
#include <arpa/inet.h>
Also, use real struct in_addr rather than u_long.
This commit is contained in:
parent
a60c62a3c0
commit
28faa5304b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=36914
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user