Commit 4b664e9c authored by Marc Ariberti's avatar Marc Ariberti

glibc 2.1 port for linupy (linux on a yopy pda)

* 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 !
parent 84bfb7f2
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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 )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment