From 8e4aa0d47bb873dd2ed2799d88ca7a798b3fd01e Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 24 Jul 2025 15:04:12 +0200 Subject: [PATCH] wincrypt.h is necessary here The issue with this is that the if_nametoindex auto-detection code would also need this hack, and it will make those super complicated. The auto-detection is not normally run with cmake (but necessary to pass a checkprefill test). With autotools however, it's required to detect if_nametoindex. `wincrypt.h` is not safe to include as-is because UWP does not support it, but in this case this is safe because `if_nametoindex` is not supported by UWP, and thus `HAVE_IF_NAMETOINDEX` is always undefined. --- lib/url.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/url.c b/lib/url.c index da832e3396..54fed348b0 100644 --- a/lib/url.c +++ b/lib/url.c @@ -60,7 +60,9 @@ #endif #if defined(HAVE_IF_NAMETOINDEX) && defined(_WIN32) -#include +#if __MINGW64_VERSION_MAJOR <= 5 +#include /* to avoid a mingw-w64 header issue */ +#endif #include #endif