Browse Source

configure: check and define if_nametoindex() on OS/2

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
-----

Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
pull/65/head
KO Myung-Hun 8 years ago
committed by Hugo Beauzée-Luyssen
parent
commit
ebcbb4d84e
  1. 1
      configure.ac
  2. 4
      include/vlc_fixups.h

1
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

4
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 */

Loading…
Cancel
Save