Mercurial > gub
view patches/glib-2.44.1-mingw-w64-if_nametoindex.patch @ 6512:ccc20ae889ca default tip guix
mingw::guile-2.0.7 builds.
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Thu, 24 Mar 2016 08:03:39 +0100 |
parents | 145eca92e235 |
children |
line wrap: on
line source
--- glib-2.44.1/gio/gsocket.c.org 2015-03-23 03:19:51.000000000 +0900 +++ glib-2.44.1/gio/gsocket.c 2015-08-30 12:11:11.394997300 +0900 @@ -1939,7 +1939,7 @@ #if !defined(HAVE_IF_NAMETOINDEX) && defined(G_OS_WIN32) static guint -if_nametoindex (const gchar *iface) +if_nametoindex_wrap (const gchar *iface) { PIP_ADAPTER_ADDRESSES addresses = NULL, p; gulong addresses_len = 0; @@ -1992,6 +1992,8 @@ } #define HAVE_IF_NAMETOINDEX 1 +#else +#define if_nametoindex_wrap if_nametoindex #endif static gboolean @@ -2026,12 +2028,12 @@ #ifdef HAVE_IP_MREQN if (iface) - mc_req.imr_ifindex = if_nametoindex (iface); + mc_req.imr_ifindex = if_nametoindex_wrap (iface); else mc_req.imr_ifindex = 0; /* Pick any. */ #elif defined(G_OS_WIN32) if (iface) - mc_req.imr_interface.s_addr = g_htonl (if_nametoindex (iface)); + mc_req.imr_interface.s_addr = g_htonl (if_nametoindex_wrap (iface)); else mc_req.imr_interface.s_addr = g_htonl (INADDR_ANY); #else @@ -2064,7 +2066,7 @@ memcpy (&mc_req_ipv6.ipv6mr_multiaddr, native_addr, sizeof (struct in6_addr)); #ifdef HAVE_IF_NAMETOINDEX if (iface) - mc_req_ipv6.ipv6mr_interface = if_nametoindex (iface); + mc_req_ipv6.ipv6mr_interface = if_nametoindex_wrap (iface); else #endif mc_req_ipv6.ipv6mr_interface = 0;