gio/tests/inet-address: fix to work on OS X

OS X's getaddrinfo() only supports IPv6 scope IDs that are interface
names, not numbers. So use if_indextoname() to get the name of an
interface and construct an address using that.

https://bugzilla.gnome.org/show_bug.cgi?id=700123
This commit is contained in:
Dan Winship
2013-05-25 11:09:43 -03:00
parent c828aef014
commit 16b26231ca
2 changed files with 24 additions and 4 deletions

View File

@@ -1126,7 +1126,7 @@ if $glib_failed ; then
AC_MSG_ERROR([Could not determine values for MSG_* constants])
fi
AC_CHECK_FUNCS(getprotobyname_r endservent if_nametoindex)
AC_CHECK_FUNCS(getprotobyname_r endservent if_nametoindex if_indextoname)
AS_IF([test $glib_native_win32 = yes], [
# <wspiapi.h> in the Windows SDK and in mingw-w64 has wrappers for