headers: Define MapViewOfFile2 as inline function
As doucumented by https://github.com/MicrosoftDocs/sdk-api/commit/9173247d41163f99453c8169c517da359d2f64b4
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
diff --git a/mingw-w64-headers/include/memoryapi.h b/mingw-w64-headers/include/memoryapi.h
index 889c2a5..cebecd8 100644
--- a/mingw-w64-headers/include/memoryapi.h
+++ b/mingw-w64-headers/include/memoryapi.h
@@ -159,7 +159,9 @@
#if NTDDI_VERSION >= NTDDI_WIN10_RS2
WINBASEAPI PVOID WINAPI MapViewOfFileNuma2(HANDLE FileMappingHandle, HANDLE ProcessHandle, ULONG64 Offset, PVOID BaseAddress, SIZE_T ViewSize, ULONG AllocationType, ULONG PageProtection, ULONG PreferredNode);
- WINBASEAPI PVOID MapViewOfFile2(HANDLE FileMappingHandle, HANDLE ProcessHandle, ULONG64 Offset, PVOID BaseAddress, SIZE_T ViewSize, ULONG AllocationType, ULONG PageProtection);
+ FORCEINLINE PVOID MapViewOfFile2(HANDLE FileMappingHandle, HANDLE ProcessHandle, ULONG64 Offset, PVOID BaseAddress, SIZE_T ViewSize, ULONG AllocationType, ULONG PageProtection) {
+ return MapViewOfFileNuma2(FileMappingHandle, ProcessHandle, Offset, BaseAddress, ViewSize, AllocationType, PageProtection, NUMA_NO_PREFERRED_NODE);
+ }
#endif
#if NTDDI_VERSION >= NTDDI_WIN10_RS4