Merge pull request #1816 from kassane/clang-getpagesize

Clang/MinGW getpagesize
This commit is contained in:
lazymio 2023-04-10 17:49:55 +08:00 committed by GitHub
commit 2849bc010a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
#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)
{
if (ptr == NULL) {