Skip to content
Snippets Groups Projects
Commit 64d46c2b authored by Steve Lhomme's avatar Steve Lhomme
Browse files

win32: assume PROCESS_MITIGATION_IMAGE_LOAD_POLICY is defined

It was added in mingw-w64 in [1] which is in v6, our minimum version.
We don't need to have it defined in UWP builds as we don't use winvlc.c.

[1] https://github.com/mingw-w64/mingw-w64/commit/36d7b92bbcec1e72d3ce24013b01f7acc34be3b0
parent 3907bd7d
No related branches found
No related tags found
1 merge request!6387win32: assume PROCESS_MITIGATION_IMAGE_LOAD_POLICY is defined
Pipeline #537905 passed with stages
in 34 minutes and 55 seconds
......@@ -81,19 +81,6 @@ static BOOL SetDefaultDllDirectories_(DWORD flags)
static void PrioritizeSystem32(void)
{
#ifndef HAVE_PROCESS_MITIGATION_IMAGE_LOAD_POLICY
typedef struct _PROCESS_MITIGATION_IMAGE_LOAD_POLICY {
union {
DWORD Flags;
struct {
DWORD NoRemoteImages :1;
DWORD NoLowMandatoryLabelImages :1;
DWORD PreferSystem32Images :1;
DWORD ReservedFlags :29;
};
};
} PROCESS_MITIGATION_IMAGE_LOAD_POLICY;
#endif
#if _WIN32_WINNT < _WIN32_WINNT_WIN8
BOOL (WINAPI *SetProcessMitigationPolicy)(PROCESS_MITIGATION_POLICY, PVOID, SIZE_T);
HINSTANCE h_Kernel32 = GetModuleHandle(TEXT("kernel32.dll"));
......
......@@ -313,10 +313,6 @@
/* Define to 1 if you have the `posix_memalign' function. */
#mesondefine HAVE_POSIX_MEMALIGN
/* Define to 1 if the system has the type
`PROCESS_MITIGATION_IMAGE_LOAD_POLICY'. */
#mesondefine HAVE_PROCESS_MITIGATION_IMAGE_LOAD_POLICY
/* Define to 1 if using libprojectM 2.x */
#mesondefine HAVE_PROJECTM2
......
......@@ -4781,14 +4781,6 @@ AS_IF([test "${SYS}" = "mingw32"], [
])
AM_CONDITIONAL([HAVE_MAKENSIS], [test "$MAKENSIS" != "no" && test "$nsis_version_ok" = "yes"])
dnl
dnl Check wether we have the PROCESS_MITIGATION_IMAGE_LOAD_POLICY
dnl It should only be available when building for win10, but some SDKs define it unconditionnaly
dnl
if test "${SYS}" = "mingw32"; then
AC_CHECK_TYPES([PROCESS_MITIGATION_IMAGE_LOAD_POLICY],,,[#include <windows.h>])
fi
EXTEND_HELP_STRING([Components:])
dnl
......
......@@ -379,11 +379,6 @@ windows_version_test = '''
vlc_conf_prefix = vlc_conf_prefix + '#define @0@ @1@\n'.format(d.get(0), d.get(1))
endforeach
# Check for HAVE_PROCESS_MITIGATION_IMAGE_LOAD_POLICY type
if cc.has_type('PROCESS_MITIGATION_IMAGE_LOAD_POLICY', prefix: '#include <windows.h>')
cdata.set('HAVE_PROCESS_MITIGATION_IMAGE_LOAD_POLICY', 1)
endif
mingw_check = '''
#ifndef __MINGW32__
# error Not compiling with mingw
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment