Merge pull request #1816 from kassane/clang-getpagesize

Clang/MinGW getpagesize
This commit is contained in:
2023-04-10 17:49:55 +08:00
committed by GitHub

View File

@@ -45,6 +45,16 @@ static void *qemu_ram_mmap(struct uc_struct *uc,
static void qemu_ram_munmap(struct uc_struct *uc, void *ptr, size_t size); static void qemu_ram_munmap(struct uc_struct *uc, void *ptr, size_t size);
#endif #endif
#if defined(__MINGW32__) && defined(__clang__)
#include <windows.h>
int getpagesize()
{
SYSTEM_INFO S;
GetNativeSystemInfo(&S);
return S.dwPageSize;
}
#endif
void *qemu_oom_check(void *ptr) void *qemu_oom_check(void *ptr)
{ {
if (ptr == NULL) { if (ptr == NULL) {