Commit c0bf5aee authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

configure: Assume if_nametoindex to be present

parent 949fdc70
......@@ -656,7 +656,7 @@ AC_SEARCH_LIBS(connect, [socket], [
])
], [
AS_IF([test "${SYS}" = "mingw32"], [
SOCKET_LIBS="-lws2_32"
SOCKET_LIBS="-lws2_32 -liphlpapi"
])
])
......@@ -680,7 +680,7 @@ AC_LINK_IFELSE([
char dst[[sizeof(struct in_addr)]];
inet_pton(AF_INET, "127.0.0.1", dst);
])],[AC_DEFINE([HAVE_INET_PTON],[1],[Define to 1 if you have inet_pton function])],[AC_LIBOBJ([inet_pton])])
AC_CHECK_FUNCS([if_nameindex if_nametoindex])
AC_CHECK_FUNCS([if_nameindex])
VLC_RESTORE_FLAGS
AC_SUBST(SOCKET_LIBS)
......
......@@ -411,9 +411,6 @@ struct if_nameindex
unsigned if_index;
char *if_name;
};
# ifndef HAVE_IF_NAMETOINDEX
# define if_nametoindex(name) atoi(name)
# endif
# define if_nameindex() (errno = ENOBUFS, NULL)
# define if_freenameindex(list) (void)0
#endif
......
......@@ -41,6 +41,7 @@
#ifdef _WIN32
# undef EAFNOSUPPORT
# define EAFNOSUPPORT WSAEAFNOSUPPORT
# include <iphlpapi.h>
#else
# include <unistd.h>
# ifdef HAVE_NET_IF_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