if (ioctl (s, SIOCGIFCONF, (char *) &ifc) < 0)
if (__ioctl (s, SIOCGIFCONF, (char *) &ifc) < 0)
get_myaddress (struct sockaddr_in *addr){  int s;  char buf[BUFSIZ];  struct ifconf ifc;  struct ifreq ifreq, *ifr;  int len, loopback = 0;  if ((s = socket (AF_INET, SOCK_DGRAM, 0)) < 0)    {      perror ("get_myaddress: socket");      exit (1);    }  ifc.ifc_len = sizeof (buf);  ifc.ifc_buf = buf;  if (ioctl (s, SIOCGIFCONF, (char *) &ifc) < 0)    {      perror (_("get_myaddress: ioctl (get interface configuration)"));      exit (1);    } again:  ifr = ifc.ifc_req;  for (len = ifc.ifc_len; len; len -= sizeof ifreq)    {      ifreq = *ifr;      if (ioctl (s, SIOCGIFFLAGS, (char *) &ifreq) < 0)	{          perror ("get_myaddress: ioctl");          exit (1);	}      if ((ifreq.ifr_flags & IFF_UP) && (ifr->ifr_addr.sa_family == AF_INET)	  && (!(ifreq.ifr_flags & IFF_LOOPBACK) ||	      (loopback == 1 && (ifreq.ifr_flags & IFF_LOOPBACK))))	{	  *addr = *((struct sockaddr_in *) &ifr->ifr_addr);	  addr->sin_port = htons (PMAPPORT);	  close (s);	  return;	}      ifr++;    }  if (loopback == 0)    {      loopback = 1;      goto again;    }  close (s);}