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