mirror of
https://github.com/N64Recomp/N64ModernRuntime.git
synced 2026-05-11 03:12:15 +00:00
Fix missing include on POSIX systems
This commit is contained in:
parent
a0f37a444b
commit
9476b8f6df
1 changed files with 8 additions and 1 deletions
|
|
@ -24,6 +24,13 @@
|
||||||
#include "librecomp/addresses.hpp"
|
#include "librecomp/addresses.hpp"
|
||||||
#include "librecomp/mods.hpp"
|
#include "librecomp/mods.hpp"
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# include <Windows.h>
|
||||||
|
#else
|
||||||
|
# include <sys/mman.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#define PATHFMT "%ls"
|
#define PATHFMT "%ls"
|
||||||
#else
|
#else
|
||||||
|
|
@ -609,7 +616,7 @@ void recomp::start(
|
||||||
rdram = reinterpret_cast<uint8_t*>(VirtualAlloc(nullptr, mem_size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE));
|
rdram = reinterpret_cast<uint8_t*>(VirtualAlloc(nullptr, mem_size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE));
|
||||||
alloc_failed = (rdram == nullptr);
|
alloc_failed = (rdram == nullptr);
|
||||||
#else
|
#else
|
||||||
uint8_t* rdram = (uint8_t*)mmap(NULL, mem_size, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0);
|
rdram = (uint8_t*)mmap(NULL, mem_size, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0);
|
||||||
alloc_failed = rdram == reinterpret_cast<uint8_t*>(MAP_FAILED);
|
alloc_failed = rdram == reinterpret_cast<uint8_t*>(MAP_FAILED);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue