Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -1453,10 +1453,12 @@ #ifdef AF_INET6 egrep_cpp_yes #endif ], [ AC_DEFINE(OF_HAVE_IPV6, 1, [Whether we have IPv6]) + + AC_CHECK_FUNCS(inet6_getscopeid) ]) ], [ dnl Work around a bug in autoconf 2.61 that creates a broken dnl configure if this branch is empty. : Index: src/platform/POSIX/OFSystemInfo+NetworkInterfaces.m ================================================================== --- src/platform/POSIX/OFSystemInfo+NetworkInterfaces.m +++ src/platform/POSIX/OFSystemInfo+NetworkInterfaces.m @@ -224,14 +224,20 @@ # if defined(OF_HAVE_IPV6) && defined(HAVE_IF_NAMETOINDEX) if (address.sockaddr.in6.sin6_family == AF_INET6 && address.sockaddr.in6.sin6_addr.s6_addr[0] == 0xFE && (address.sockaddr.in6.sin6_addr.s6_addr[1] & 0xC0) - == 0x80) + == 0x80) { +# if defined(HAVE_INET6_GETSCOPEID) + inet6_getscopeid(&address.sockaddr.in6, + INET6_IS_ADDR_LINKLOCAL); +# elif defined(HAVE_IF_NAMETOINDEX) address.sockaddr.in6.sin6_scope_id = if_nametoindex( [name cStringWithEncoding: encoding]); +# endif + } # endif [addresses addItem: &address]; next: