[farsight2/master] Added missing HAVE_IP_MREQN guards when using mreq.imr_addres/mreq.imr_interface Patch from Haakon Sporsheim <haakon.sporsheim at tandberg.com>
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:22:24 PST 2008
---
transmitters/multicast/fs-multicast-transmitter.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/transmitters/multicast/fs-multicast-transmitter.c b/transmitters/multicast/fs-multicast-transmitter.c
index 6b6d7b7..90be4fe 100644
--- a/transmitters/multicast/fs-multicast-transmitter.c
+++ b/transmitters/multicast/fs-multicast-transmitter.c
@@ -569,11 +569,19 @@ _bind_port (
struct sockaddr_in tmpaddr;
if (!_ip_string_into_sockaddr_in (local_ip, &tmpaddr, error))
goto error;
+#ifdef HAVE_IP_MREQN
memcpy (&mreq.imr_address, &tmpaddr.sin_addr, sizeof (mreq.imr_address));
+#else
+ memcpy (&mreq.imr_interface, &tmpaddr.sin_addr, sizeof (mreq.imr_interface));
+#endif
}
else
{
+#ifdef HAVE_IP_MREQN
mreq.imr_address.s_addr = INADDR_ANY;
+#else
+ mreq.imr_interface.s_addr = INADDR_ANY;
+#endif
}
#ifdef HAVE_IP_MREQN
--
1.5.6.5
More information about the farsight-commits
mailing list