Merge pull request #1816 from kassane/clang-getpagesize
Clang/MinGW getpagesize
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user