diff --git a/libretro-common/include/memmap.h b/libretro-common/include/memmap.h index 511caee783..492ace6636 100644 --- a/libretro-common/include/memmap.h +++ b/libretro-common/include/memmap.h @@ -38,7 +38,7 @@ #define MAP_ANONYMOUS MAP_ANON #endif -#if !defined(HAVE_MMAN) +#if !defined(HAVE_MMAN) || defined(_WIN32) void* mmap(void *desired_addr, size_t len, int mmap_prot, int mmap_flags, int fildes, size_t off); void munmap(void *base_addr, size_t len); diff --git a/libretro-common/memmap/memmap.c b/libretro-common/memmap/memmap.c index c9540a064b..cfc4974459 100644 --- a/libretro-common/memmap/memmap.c +++ b/libretro-common/memmap/memmap.c @@ -46,7 +46,7 @@ # define DWORD_LO(x) (x) #endif -static void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset) +void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset) { uint32_t flProtect, dwDesiredAccess; off_t end; @@ -108,13 +108,13 @@ static void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t return ret; } -static void munmap(void *addr, size_t length) +void munmap(void *addr, size_t length) { UnmapViewOfFile(addr); /* ruh-ro, we leaked handle from CreateFileMapping() ... */ } -static int mprotect(void *addr, size_t len, int prot) +int mprotect(void *addr, size_t len, int prot) { /* Incomplete, just assumes PAGE_EXECUTE_READWRITE right now * instead of correctly handling prot */