]> git.sesse.net Git - vlc/commitdiff
glibc 2.1 port for linupy (linux on a yopy pda)
authorMarc Ariberti <marcari@videolan.org>
Fri, 7 Feb 2003 23:36:55 +0000 (23:36 +0000)
committerMarc Ariberti <marcari@videolan.org>
Fri, 7 Feb 2003 23:36:55 +0000 (23:36 +0000)
* modules/access/*.c : added include <sys/time.h> for struct timeval
* ipv6.c : ipv6 is not fully supported under glibc2.1 (especially multicast)

VLC rulz on Yopy !

modules/access/ftp.c
modules/access/http.c
modules/access/mms/mms.c
modules/access/udp.c
modules/misc/network/ipv6.c

index cf79b155c338c12f6c9b91473bea78f6a8402a25..3f048ad3c9dd56150e4e80f4d82b67ab363cd804 100644 (file)
@@ -2,7 +2,7 @@
  * ftp.c:
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: ftp.c,v 1.6 2003/02/04 10:07:40 massiot Exp $
+ * $Id: ftp.c,v 1.7 2003/02/07 23:36:55 marcari Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -26,6 +26,7 @@
  *****************************************************************************/
 #include <stdlib.h>
 #include <sys/types.h>
+#include <sys/time.h>
 #include <sys/stat.h>
 #include <string.h>
 #include <errno.h>
index f20e765e2ba66a6e92b707b29792d74242f479dc..d06a25363442a62ace4d66c57f868b9ec9dd17a7 100644 (file)
@@ -2,7 +2,7 @@
  * http.c: HTTP access plug-in
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: http.c,v 1.21 2003/02/04 10:07:40 massiot Exp $
+ * $Id: http.c,v 1.22 2003/02/07 23:36:55 marcari Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -26,6 +26,7 @@
  *****************************************************************************/
 #include <stdlib.h>
 #include <string.h>
+#include <sys/time.h>
 #include <vlc/vlc.h>
 #include <vlc/input.h>
 
index 445ff713258bc291cc5bf65214fc3ef08e8821b1..861d8e7964bb2a07b030d761c5cf55b3b9e8b02f 100644 (file)
@@ -2,7 +2,7 @@
  * mms.c: MMS access plug-in
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: mms.c,v 1.17 2003/01/27 16:28:42 fenrir Exp $
+ * $Id: mms.c,v 1.18 2003/02/07 23:36:55 marcari Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -33,6 +33,7 @@
  * Preamble
  *****************************************************************************/
 #include <stdlib.h>
+#include <sys/time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <string.h>
index b7801b854fc719699a1ca9adf780409406a21cef..d84b6833d805c3592bbde905e39e4daf3cae691b 100644 (file)
@@ -2,7 +2,7 @@
  * udp.c: raw UDP & RTP access plug-in
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: udp.c,v 1.11 2003/02/04 10:07:40 massiot Exp $
+ * $Id: udp.c,v 1.12 2003/02/07 23:36:55 marcari Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Tristan Leteurtre <tooney@via.ecp.fr>
@@ -26,6 +26,7 @@
  * Preamble
  *****************************************************************************/
 #include <stdlib.h>
+#include <sys/time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <string.h>
index 039741d3c1c18e5dea94f857fa8e45e55524c6cb..f046057273aa45dd0a41c4cb3ea75e33056a6e53 100644 (file)
@@ -2,7 +2,7 @@
  * ipv6.c: IPv6 network abstraction layer
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: ipv6.c,v 1.7 2002/12/23 16:21:54 massiot Exp $
+ * $Id: ipv6.c,v 1.8 2003/02/07 23:36:55 marcari Exp $
  *
  * Authors: Alexis Guillard <alexis.guillard@bt.com>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -141,13 +141,15 @@ static int BuildAddr( vlc_object_t * p_this, struct sockaddr_in6 * p_socket,
                              psz_multicast_interface );
 
             /* now convert that interface name to an index */
-#if !defined( WIN32 )
+#if __GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2
+#   if !defined( WIN32 )
             p_socket->sin6_scope_id = if_nametoindex(psz_multicast_interface);
-#else
+#   else
             /* FIXME: for now we always use the default interface */
             p_socket->sin6_scope_id = 0;
-#endif
+#   endif
             msg_Warn( p_this, " = #%i", p_socket->sin6_scope_id );
+#endif
         }
         psz_address[strlen(psz_address) - 1] = '\0' ;
 
@@ -315,6 +317,7 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
     }
  
     /* Join the multicast group if the socket is a multicast address */
+#if __GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2
     if( IN6_IS_ADDR_MULTICAST(&sock.sin6_addr) )
     {
         struct ipv6_mreq     imr;
@@ -328,8 +331,11 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
         if( res == -1 )
         {
             msg_Err( p_this, "setsockopt JOIN_GROUP failed" );
-        }
+        } 
     }
+#else
+    msg_Warn( p_this, "setsockopt JOIN_GROUP not supported with glibc < 2.2" );
+#endif
 
 
     if( *psz_server_addr )