close (fd);
__close (fd);
if_nametoindex (const char *ifname){#ifndef SIOGIFINDEX  __set_errno (ENOSYS);  return 0;#else  struct ifreq ifr;  int fd = opensock ();  if (fd < 0)    return 0;  strncpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name));  if (ioctl (fd, SIOGIFINDEX, &ifr) < 0)    {      int saved_errno = errno;      close (fd);      if (saved_errno == EINVAL)	__set_errno (ENOSYS);      return 0;    }  close (fd);  return ifr.ifr_ifindex;#endif}