diff options
Diffstat (limited to 'libc/inet')
-rw-r--r-- | libc/inet/resolv.c | 23 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_simple.c | 14 |
2 files changed, 23 insertions, 14 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index d02d29fbc..00b7a7634 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -67,12 +67,19 @@ extern int nameservers; -extern const char * nameserver[MAX_SERVERS]; +extern char * nameserver[MAX_SERVERS]; extern int searchdomains; -extern const char * searchdomain[MAX_SEARCH]; +extern char * searchdomain[MAX_SEARCH]; extern struct hostent * get_hosts_byname(const char * name); extern struct hostent * get_hosts_byaddr(const char * addr, int len, int type); extern struct hostent * read_etc_hosts(const char * name, int ip); +extern int resolve_address(const char * address, int nscount, + char ** nsip, struct in_addr * in); +extern int resolve_mailbox(const char * address, int nscount, + char ** nsip, struct in_addr * in); +extern int dns_lookup(const char * name, int type, int nscount, + char ** nsip, unsigned char ** outpacket, struct resolv_answer * a); + #ifdef L_encodeh @@ -451,7 +458,7 @@ void dns_catch_signal(int signo) dns_caught_signal = 1; } -int dns_lookup(const char *name, int type, int nscount, const char **nsip, +int dns_lookup(const char *name, int type, int nscount, char **nsip, unsigned char **outpacket, struct resolv_answer *a) { static int id = 1; @@ -650,7 +657,7 @@ fail: #ifdef L_resolveaddress int resolve_address(const char *address, int nscount, - const char **nsip, struct in_addr *in) + char **nsip, struct in_addr *in) { unsigned char *packet; struct resolv_answer a; @@ -700,8 +707,8 @@ int resolve_address(const char *address, int nscount, #ifdef L_resolvemailbox -int resolve_mailbox(const char *address, - int nscount, const char **nsip, struct in_addr *in) +int resolve_mailbox(const char *address, int nscount, + char **nsip, struct in_addr *in) { struct resolv_answer a; unsigned char *packet; @@ -760,9 +767,9 @@ int resolve_mailbox(const char *address, #ifdef L_opennameservers int nameservers; -const char * nameserver[MAX_SERVERS]; +char * nameserver[MAX_SERVERS]; int searchdomains; -const char * searchdomain[MAX_SEARCH]; +char * searchdomain[MAX_SEARCH]; /* * we currently read formats not quite the same as that on normal diff --git a/libc/inet/rpc/clnt_simple.c b/libc/inet/rpc/clnt_simple.c index 4b2a6e4d6..c0369e17c 100644 --- a/libc/inet/rpc/clnt_simple.c +++ b/libc/inet/rpc/clnt_simple.c @@ -74,7 +74,9 @@ int callrpc (const char *host, const u_long prognum, crp->socket = RPC_ANYSOCK; } if (crp->valid && crp->oldprognum == prognum - && crp->oldversnum == versnum && strcmp(crp->oldhost, host) == 0) { + && crp->oldversnum == versnum && + strcmp(crp->oldhost, host) == 0) + { /* reuse old client */ } else { crp->valid = 0; @@ -91,9 +93,9 @@ int callrpc (const char *host, const u_long prognum, bcopy(hp->h_addr, (char *) &server_addr.sin_addr, hp->h_length); server_addr.sin_family = AF_INET; server_addr.sin_port = 0; - if ((crp->client = clntudp_create(&server_addr, (u_long) prognum, - (u_long) versnum, timeout, - &crp->socket)) == NULL) + if ((crp->client = clntudp_create(&server_addr, + (u_long) prognum, (u_long) versnum, + timeout, &crp->socket)) == NULL) return ((int) rpc_createerr.cf_stat); crp->valid = 1; crp->oldprognum = prognum; @@ -102,8 +104,8 @@ int callrpc (const char *host, const u_long prognum, } tottimeout.tv_sec = 25; tottimeout.tv_usec = 0; - clnt_stat = clnt_call(crp->client, procnum, inproc, in, - outproc, out, tottimeout); + clnt_stat = clnt_call(crp->client, procnum, inproc, (char*)in, + outproc, out, tottimeout); /* * if call failed, empty cache */ |