add typedef of WIN32_MEMORY_RANGE_ENTRY and PWIN32_MEMORY_RANGE_ENTRY to make it work under MinGW
This commit is contained in:
parent
ead607e013
commit
35ee170413
1 changed files with 7 additions and 0 deletions
|
@ -1802,6 +1802,13 @@ struct llama_mmap {
|
||||||
|
|
||||||
if (prefetch > 0) {
|
if (prefetch > 0) {
|
||||||
// PrefetchVirtualMemory is only present on Windows 8 and above, so we dynamically load it
|
// PrefetchVirtualMemory is only present on Windows 8 and above, so we dynamically load it
|
||||||
|
#if (_WIN32_WINNT < _WIN32_WINNT_WIN8)
|
||||||
|
typedef struct _WIN32_MEMORY_RANGE_ENTRY {
|
||||||
|
PVOID VirtualAddress;
|
||||||
|
SIZE_T NumberOfBytes;
|
||||||
|
} WIN32_MEMORY_RANGE_ENTRY, *PWIN32_MEMORY_RANGE_ENTRY;
|
||||||
|
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
|
||||||
|
|
||||||
BOOL (WINAPI *pPrefetchVirtualMemory) (HANDLE, ULONG_PTR, PWIN32_MEMORY_RANGE_ENTRY, ULONG);
|
BOOL (WINAPI *pPrefetchVirtualMemory) (HANDLE, ULONG_PTR, PWIN32_MEMORY_RANGE_ENTRY, ULONG);
|
||||||
HMODULE hKernel32 = GetModuleHandleW(L"kernel32.dll");
|
HMODULE hKernel32 = GetModuleHandleW(L"kernel32.dll");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue