raise minimum required mingw64 version from 5.0 to 6.0

DirectX 12 sdk provided by MinGW 8.0.1 is required for Qt 6,
and patching MinGW 5.0 to include d3d12 sdk requires sheer
amount of effort.
This commit is contained in:
Fatih Uzunoglu 2024-02-08 18:11:02 +02:00 committed by Steve Lhomme
parent 9ffc31dd5f
commit 4baa098d90
4 changed files with 6 additions and 16 deletions

View File

@ -106,11 +106,7 @@ static void PrioritizeSystem32(void)
#endif
PROCESS_MITIGATION_IMAGE_LOAD_POLICY m = { .Flags = 0 };
m.PreferSystem32Images = 1;
#if defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR < 6
SetProcessMitigationPolicy( (PROCESS_MITIGATION_POLICY)10, &m, sizeof( m ) );
#else
SetProcessMitigationPolicy( ProcessImageLoadPolicy, &m, sizeof( m ) );
#endif
}
static void vlc_kill(void *data)

View File

@ -663,7 +663,7 @@ dnl Check for broken versions of mingw-runtime compatability library
AC_PREPROC_IFELSE([AC_LANG_SOURCE([
#include <_mingw.h>
#if defined(__MINGW64_VERSION_MAJOR)
# if __MINGW64_VERSION_MAJOR < 5
# if __MINGW64_VERSION_MAJOR < 6
# error Update your mingw-w64! This one is too old.
# endif
#else
@ -673,7 +673,7 @@ dnl Check for broken versions of mingw-runtime compatability library
AC_MSG_RESULT([ok])
], [
AC_MSG_RESULT([present])
AC_MSG_ERROR([LibVLC requires Mingw-w64 version 5.0 or higher!])
AC_MSG_ERROR([LibVLC requires Mingw-w64 version 6.0 or higher!])
])
AS_IF([test "${win_ucrt_build}" = "no"], [
@ -1176,9 +1176,6 @@ 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("");

View File

@ -359,12 +359,12 @@ windows_version_test = '''
prefix: '#include <_mingw.h>')
if mingw_version_major == ''
error('Cannot compile with MinGW, use MinGW-w64 >= 5.0 instead.')
error('Cannot compile with MinGW, use MinGW-w64 >= 6.0 instead.')
endif
# Check that MinGW w64 is at least 5.0
if mingw_version_major.to_int() < 5
error('MinGW-w64 5.0 or higher required!')
# Check that MinGW w64 is at least 6.0
if mingw_version_major.to_int() < 6
error('MinGW-w64 6.0 or higher required!')
endif
have_mingw = true

View File

@ -38,9 +38,6 @@
#include <vlc_network.h>
#ifdef _WIN32
# if defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR < 6
# include <wincrypt.h>
# endif
# include <iphlpapi.h>
#else
# include <unistd.h>