From: twinaphex Date: Wed, 14 Aug 2013 01:01:59 +0000 (+0200) Subject: Fixed plat_mmap regression - Win32 now uses the same plat_mmap X-Git-Tag: v1.85~5 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4455c234287e0324b8a79b9e9578c9aa09a25f9;p=picodrive.git Fixed plat_mmap regression - Win32 now uses the same plat_mmap codepath --- diff --git a/platform/libretro.c b/platform/libretro.c index a059157..c02b206 100644 --- a/platform/libretro.c +++ b/platform/libretro.c @@ -169,19 +169,6 @@ static void munmap(void *addr, size_t length) #endif void *plat_mmap(unsigned long addr, size_t size, int need_exec, int is_fixed) { -#ifndef _WIN32 - int flags = 0; - void *ret = mmap((void*)addr,size,PROT_READ | PROT_WRITE, flags, -1, 0); - if (addr != 0 && ret != (void *)addr) { - lprintf("warning: wanted to map @%08lx, got %p\n", - addr, ret); - - if (is_fixed) { - munmap(ret, size); - return NULL; - } - } -#else int flags = MAP_PRIVATE | MAP_ANONYMOUS; void *req, *ret; @@ -201,7 +188,6 @@ void *plat_mmap(unsigned long addr, size_t size, int need_exec, int is_fixed) return NULL; } } -#endif return ret; }