Commit b69112b4 authored by KO Myung-Hun's avatar KO Myung-Hun Committed by Hugo Beauzée-Luyssen

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: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
(cherry picked from commit ebcbb4d8)
Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent e13834a1
......@@ -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
......
......@@ -605,6 +605,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 */
......
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