rpcb_getaddr fails.

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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * 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);
  }
Topic archived. No new replies allowed.