Why is `rpcb_getaddr' failing?
Why is my linker warning me "C:/cygwin/home/eb/rap00/main.c:94: warning: passing arg 4 of `rpcb_getaddr' from incompatible pointer type"?
And yes, rpcb_getaddr() fails.
Code:
/*
* The netbuf structure is used for transport-independent address storage.
*/
struct netbuf {
unsigned int maxlen;
unsigned int len;
void *buf;
};
struct netbuf svcaddr;
struct netconfig *nconf;
char host[255] ; /* The remote host name */
svcaddr.len = 0;
svcaddr.maxlen = ADDRBUFSIZE;
svcaddr.buf = addrbuf;
/* Get pointer to struct netconfig for tcp transport */
nconf = getnetconfigent("tcp");
if (nconf == (struct netconfig *) NULL) {
printf("getnetconfigent() failed\n");
exit(1);
}
/* Get the address of remote service */
if (!rpcb_getaddr(300456, 1, nconf, &svcaddr, host)) {
printf("rpcb_getaddr() failed\n");
exit(1);
}