termux-packages/packages/glib/gio-gsocket.c.patch

28 lines
966 B
Diff
Raw Normal View History

2018-03-14 17:16:43 +01:00
diff -u -r ../glib-2.56.0/gio/gsocket.c ./gio/gsocket.c
--- ../glib-2.56.0/gio/gsocket.c 2018-01-08 21:34:19.000000000 +0000
+++ ./gio/gsocket.c 2018-03-14 10:48:50.917328275 +0000
@@ -2397,7 +2397,11 @@
memset (&mc_req_src, 0, sizeof (mc_req_src));
/* By default use the default IPv4 multicast interface. */
+#ifdef __ANDROID__
+ mc_req_src.imr_interface = g_htonl (INADDR_ANY);
+#else
mc_req_src.imr_interface.s_addr = g_htonl (INADDR_ANY);
+#endif
if (iface)
{
@@ -2442,7 +2446,11 @@
}
iface_addr = (struct sockaddr_in *) &ifr.ifr_addr;
+#ifdef __ANDROID__
+ mc_req_src.imr_interface = iface_addr->sin_addr.s_addr;
+#else
mc_req_src.imr_interface.s_addr = iface_addr->sin_addr.s_addr;
+#endif
#endif /* defined(G_OS_WIN32) && defined (HAVE_IF_NAMETOINDEX) */
}
memcpy (&mc_req_src.imr_multiaddr, g_inet_address_to_bytes (group),