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

Revert "configure: Fix if_nametoindex detection"

This reverts commit 34d97955.
This only works for win64 since win32's stdcall will mangle the symbols
parent 1bdd867e
......@@ -680,15 +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_SEARCH_LIBS([if_nametoindex], [iphlpapi], [
AS_IF([test "$ac_cv_search_if_nametoindex" != "none required"], [
SOCKET_LIBS="$ac_cv_search_if_nametoindex $SOCKET_LIBS"
])
AC_DEFINE([HAVE_IF_NAMETOINDEX], [1], [Define to 1 if you have if_nametoindex function])
])
AC_CHECK_FUNCS([if_nameindex])
AC_CHECK_FUNCS([if_nameindex if_nametoindex])
VLC_RESTORE_FLAGS
AC_SUBST(SOCKET_LIBS)
......
......@@ -411,14 +411,13 @@ 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
#ifndef HAVE_IF_NAMETOINDEX
# define if_nametoindex(name) atoi(name)
#endif
#ifndef HAVE_STRUCT_TIMESPEC
struct timespec {
time_t tv_sec; /* Seconds */
......
......@@ -41,7 +41,6 @@
#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