mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 10:40:21 +00:00
configure: remove check for if_nametoindex
if_nametoindex is present in both POSIX and Windows (since Vista) + print the error message as error_msg - debug_msg there was rather a mistake
This commit is contained in:
17
configure.ac
17
configure.ac
@@ -299,23 +299,6 @@ AC_DEFUN([DEFINE_CUDA], [
|
||||
])
|
||||
AC_SUBST(DLL_LIBS)
|
||||
|
||||
if test $system = Windows
|
||||
then
|
||||
AC_MSG_CHECKING([if_nametoindex])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <windows.h>
|
||||
#include <iphlpapi.h>
|
||||
]], [[
|
||||
if_nametoindex("eth");]]
|
||||
)], HAVE_IF_NAMETOINDEX=yes, HAVE_IF_NAMETOINDEX=no)
|
||||
AC_MSG_RESULT([$HAVE_IF_NAMETOINDEX])
|
||||
if test $HAVE_IF_NAMETOINDEX = yes; then
|
||||
AC_DEFINE([HAVE_IF_TONAMEINDEX], 1, [Function if_nametoindex is present.])
|
||||
fi
|
||||
else
|
||||
AC_CHECK_FUNCS(if_nametoindex)
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNCS(usleep)
|
||||
AC_CHECK_FUNCS(strtok_r)
|
||||
AC_CHECK_FUNCS(timespec_get)
|
||||
|
||||
@@ -810,14 +810,10 @@ socket_udp *udp_init_if(const char *addr, const char *iface, uint16_t rx_port,
|
||||
goto error;
|
||||
}
|
||||
if (iface != NULL) {
|
||||
#ifdef HAVE_IF_NAMETOINDEX
|
||||
if ((s->ifindex = if_nametoindex(iface)) == 0) {
|
||||
debug_msg("Illegal interface specification\n");
|
||||
error_msg("Illegal interface specification\n");
|
||||
goto error;
|
||||
}
|
||||
#else
|
||||
log_msg(LOG_LEVEL_ERROR, "Cannot set interface name, if_nametoindex not supported.\n");
|
||||
#endif
|
||||
} else {
|
||||
s->ifindex = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user