[vlc-devel] [PATCH 10/18] Disable sap-ipv6 feature on OS/2

Rémi Denis-Courmont remi at remlab.net
Thu Oct 20 20:28:04 CEST 2011


Le jeudi 20 octobre 2011 15:30:17 KO Myung-Hun, vous avez écrit :
> ---
>  modules/services_discovery/sap.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/modules/services_discovery/sap.c
> b/modules/services_discovery/sap.c index a44cd6d..be58b1d 100644
> --- a/modules/services_discovery/sap.c
> +++ b/modules/services_discovery/sap.c
> @@ -466,6 +466,7 @@ static void *Run( void *data )
>      InitSocket( p_sd, SAP_V4_LOCAL_ADDRESS, SAP_PORT );
>      InitSocket( p_sd, SAP_V4_LINK_ADDRESS, SAP_PORT );
> 
> +#ifndef __OS2__
>      char psz_address[NI_MAXNUMERICHOST] = "ff02::2:7ffe%";
>  #ifndef WIN32
>      struct if_nameindex *l = if_nameindex ();
> @@ -511,6 +512,7 @@ static void *Run( void *data )
>          psz_address[3] = *c_scope;
>          InitSocket( p_sd, psz_address, SAP_PORT );
>      }
> +#endif

I don't understand why this ifdef is needed. If IPv6 is not supported, or if 
if_nameindex() is absent, the code should fail safe to doing nothing.

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis



More information about the vlc-devel mailing list