Skip to content
Snippets Groups Projects
Commit ebcbb4d8 authored by KO Myung-Hun's avatar KO Myung-Hun Committed by Hugo Beauzée-Luyssen
Browse files

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>
parent ee6c9833
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment