[vlc-commits] src: fixed multicast reception on OS X when using the 10.7 SDK (close #6104 )

Felix Paul Kühne git at videolan.org
Sun Mar 4 12:42:15 CET 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Mar  4 12:42:00 2012 +0100| [84dc949e138f6231ba0c58572b7949ca4e5724a8] | committer: Felix Paul Kühne

src: fixed multicast reception on OS X when using the 10.7 SDK (close #6104)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=84dc949e138f6231ba0c58572b7949ca4e5724a8
---

 src/network/udp.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/network/udp.c b/src/network/udp.c
index 813c1b7..11a1606 100644
--- a/src/network/udp.c
+++ b/src/network/udp.c
@@ -381,7 +381,9 @@ net_SourceSubscribe (vlc_object_t *obj, int fd,
 int net_Subscribe (vlc_object_t *obj, int fd,
                    const struct sockaddr *grp, socklen_t grplen)
 {
-#ifdef MCAST_JOIN_GROUP
+/* MCAST_JOIN_GROUP was introduced to OS X in v10.7, but it doesn't work,
+ * so ignore it to use the same code as on 10.5 or 10.6 */
+#if defined (MCAST_JOIN_GROUP) && !defined (__APPLE__)
     /* Agnostic SSM multicast join */
     int level;
     struct group_req gr;
@@ -417,6 +419,7 @@ int net_Subscribe (vlc_object_t *obj, int fd,
         return 0;
 
 #else
+    VLC_UNUSED( grplen );
     switch (grp->sa_family)
     {
 # ifdef IPV6_JOIN_GROUP



More information about the vlc-commits mailing list