Commit b9cd3616 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Add check for sockaddr_storage before enabling IPv6

parent bfa89d6e
This diff is collapsed.
......@@ -1020,10 +1020,25 @@ elif test $ol_enable_ipv6 != no ; then
# endif
], [ol_cv_inet6_addrstrlen=yes], [ol_cv_inet6_addrstrlen=no])])
if test $ol_cv_inet6_addrstrlen = yes ; then
AC_CACHE_CHECK([struct sockaddr_storage],ol_cv_struct_sockaddr_storage,[
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
],[
struct sockaddr_storage ss;
], [ol_cv_struct_sockaddr_storage=yes],
[ol_cv_struct_sockaddr_storage=no])])
if test $ol_cv_inet6_addrstrlen = yes \
-a $ol_cv_struct_sockaddr_storage = yes ; then
ol_link_ipv6=yes
elif test $ol_enable_ipv6 = yes ; then
elif test $ol_enable_ipv6 = yes \
-a $ol_cv_inet6_addrstrlen = no ; then
AC_MSG_ERROR([IPv6 support requires INET6_ADDRSTRLEN])
elif test $ol_enable_ipv6 = yes \
-a $ol_cv_struct_sockaddr_storage = no ; then
AC_MSG_ERROR([IPv6 support requires struct sockaddr_storage])
fi
fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment