tsocket: fix the build without ipv6 support
[ira/wip.git] / lib / tsocket / tsocket_bsd.c
index 87586e08e3c672b1a17d3ad6dda24e782c79fa42..29097bd987898a681112493e91df89881d5c0160 100644 (file)
@@ -523,9 +523,11 @@ static char *tsocket_address_bsd_string(const struct tsocket_address *addr,
        case AF_INET:
                prefix = "ipv4";
                break;
+#ifdef HAVE_IPV6
        case AF_INET6:
                prefix = "ipv6";
                break;
+#endif
        default:
                errno = EINVAL;
                return NULL;