Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
34d97955
Commit
34d97955
authored
Dec 04, 2017
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure: Fix if_nametoindex detection
This fixes win32 builds
parent
30b6a669
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
configure.ac
configure.ac
+9
-1
include/vlc_fixups.h
include/vlc_fixups.h
+4
-3
src/network/udp.c
src/network/udp.c
+1
-0
No files found.
configure.ac
View file @
34d97955
...
...
@@ -680,7 +680,15 @@ 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_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])
VLC_RESTORE_FLAGS
AC_SUBST(SOCKET_LIBS)
...
...
include/vlc_fixups.h
View file @
34d97955
...
...
@@ -411,13 +411,14 @@ 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 */
...
...
src/network/udp.c
View file @
34d97955
...
...
@@ -41,6 +41,7 @@
#ifdef _WIN32
# undef EAFNOSUPPORT
# define EAFNOSUPPORT WSAEAFNOSUPPORT
# include <iphlpapi.h>
#else
# include <unistd.h>
# ifdef HAVE_NET_IF_H
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment