@@ -36,20 +36,28 @@ AC_CHECK_FUNC(asprintf, AC_DEFINE(HAVE_ASPRINTF, 1, "Whether we have asprintf")) AC_MSG_CHECKING(whether we have IPv6 support) AC_TRY_RUN([ + #include + #include + #include #include #include int main() { int fd; struct sockaddr_in6 addr; + fd = socket(AF_INET6, SOCK_STREAM, 0); + + /* Do something with it to prevent an error due to -Werror */ + memset(&addr, 0, sizeof(addr)); + exit(fd >= 0 ? 0 : 1); }], have_ipv6="yes", have_ipv6="no", have_ipv6="no") AC_MSG_RESULT($have_ipv6) test x"$have_ipv6" = x"yes" && \