[vlc-devel] [PATCH] udp: document why we need wincrypt.h with iphlpapi.h

Steve Lhomme robux4 at ycbcr.xyz
Thu Jun 18 15:41:08 CEST 2020


Older versions of mingw had bogus headers when using WIN32_LEAN_AND_MEAN.
---
 src/network/udp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/network/udp.c b/src/network/udp.c
index dbac266b66ef..f2361e3cd416 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>
-- 
2.26.2



More information about the vlc-devel mailing list