[vlc-devel] [PATCH] configure: check and define if_nametoindex() on OS/2

KO Myung-Hun komh78 at gmail.com
Sun Jan 7 04:06:23 CET 2018


Ping ?

KO Myung-Hun wrote:
> This fixes the following compilation breakge on OS/2.
> 
> -----
>   CC       network/udp.lo
> network/udp.c: In function 'net_SetMcastOut':
> network/udp.c:259:17: error: implicit declaration of function 'if_nametoindex'; did you mean 'if_nameindex'? [-Werror=implicit-function-declaration]
>      int scope = if_nametoindex (iface);
>                  ^~~~~~~~~~~~~~
>                  if_nameindex
> -----
> ---
>  configure.ac         | 1 +
>  include/vlc_fixups.h | 4 ++++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/configure.ac b/configure.ac
> index 9c37d78caf..c95ca2757e 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -290,6 +290,7 @@ case "${host_os}" in
>      LDFLAGS="${LDFLAGS} -Zomf -Zbin-files -Zargs-wild -Zhigh-mem"
>      AC_LIBOBJ([freeaddrinfo])
>      AC_LIBOBJ([gai_strerror])
> +    AC_CHECK_FUNCS([if_nametoindex])
>      ;;
>    *nacl*)
>      SYS=nacl
> diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
> index 6175a539bd..0791aba4d6 100644
> --- a/include/vlc_fixups.h
> +++ b/include/vlc_fixups.h
> @@ -602,6 +602,10 @@ static const struct in6_addr in6addr_any =
>  # ifndef EPROTO
>  #  define EPROTO (ELAST + 1)
>  # endif
> +
> +# ifndef HAVE_IF_NAMETOINDEX
> +#  define if_nametoindex(name)  atoi(name)
> +# endif
>  #endif
>  
>  /* math.h */

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.os2.kr/



More information about the vlc-devel mailing list