vlc | branch: master | Steve Lhomme <[email protected]> | Thu Jun 18 15:40:53 2020 +0200| [bdf2857fb17e9596fe3cb59908201a6332a0a8a2] | committer: Steve Lhomme
udp: document why we need wincrypt.h with iphlpapi.h Older versions of mingw had bogus headers when using WIN32_LEAN_AND_MEAN. Also integrate the patch from Francois to fix the detection in configure. Co-authored-by: Francois Cartegnie <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bdf2857fb17e9596fe3cb59908201a6332a0a8a2 --- configure.ac | 3 +++ src/network/udp.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 89fc36cdf4..977029016e 100644 --- a/configure.ac +++ b/configure.ac @@ -1069,6 +1069,9 @@ AS_IF([test "${SYS}" = "mingw32"], [ AC_MSG_CHECKING(for if_nametoindex availability) AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[#include <windows.h> + #if defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR < 6 + # include <wincrypt.h> + #endif #include <iphlpapi.h> static void test (void) { if_nametoindex(""); diff --git a/src/network/udp.c b/src/network/udp.c index dbac266b66..f2361e3cd4 100644 --- a/src/network/udp.c +++ b/src/network/udp.c @@ -40,7 +40,9 @@ #ifdef _WIN32 # undef EAFNOSUPPORT # define EAFNOSUPPORT WSAEAFNOSUPPORT -# include <wincrypt.h> +# if defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR < 6 +# include <wincrypt.h> +# endif # include <iphlpapi.h> #else # include <unistd.h> _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
