osdep/main-fn-win: add struct typedef for compatibility

This commit is contained in:
Kacper Michajłow 2024-05-01 21:44:17 +02:00
parent 419898267e
commit 041a925ada
1 changed files with 3 additions and 3 deletions

View File

@ -15,10 +15,10 @@
#define HEAP_OPTIMIZE_RESOURCES_CURRENT_VERSION 1
#define HeapOptimizeResources ((HEAP_INFORMATION_CLASS)3)
struct HEAP_OPTIMIZE_RESOURCES_INFORMATION {
typedef struct HEAP_OPTIMIZE_RESOURCES_INFORMATION {
DWORD Version;
DWORD Flags;
};
} HEAP_OPTIMIZE_RESOURCES_INFORMATION;
#endif
@ -44,7 +44,7 @@ static void microsoft_nonsense(void)
HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);
// Allow heap cache optimization and memory decommit
struct HEAP_OPTIMIZE_RESOURCES_INFORMATION heap_info = {
HEAP_OPTIMIZE_RESOURCES_INFORMATION heap_info = {
.Version = HEAP_OPTIMIZE_RESOURCES_CURRENT_VERSION
};
HeapSetInformation(NULL, HeapOptimizeResources, &heap_info,