5089N/A# These changes should be submitted upstream.
5089N/A+/* Since OpenSolaris build 137, RFC2553 is supported
5089N/A+ * so ifa_addr member of "struct ifaddrs" has type
5089N/A+ * "struct sockaddr_storage"
5089N/A+#ifdef HAVE_STRUCT_IFADDRS_IFA_ADDR__SS_FAMILY
5089N/A+#define ADDR_FAMILY_MEMBER ss_family
5089N/A+#define ADDR_FAMILY_MEMBER sa_family
5089N/A * Calling sizeof(struct ifreq) isn't always correct on
5089N/A * Mac OS X (and maybe others).
5089N/A for (ifa = start; ifa; ifa = ifa->ifa_next) {
5089N/A- int family = ifa->ifa_addr ? ifa->ifa_addr->sa_family : AF_UNSPEC;
5089N/A+ int family = ifa->ifa_addr ? ifa->ifa_addr->ADDR_FAMILY_MEMBER: AF_UNSPEC;
5089N/A char host[INET6_ADDRSTRLEN];
5089N/A tmp += HX_SIZE_OF_IFREQ(*ifr);
5089N/A struct sockaddr_in *sinptr = (struct sockaddr_in *)&ifr->ifr_addr;
5089N/A inet_ntop(AF_INET, &sinptr->sin_addr, dst,