Fix macOS builds

This commit is contained in:
Cacodemon345
2021-12-01 11:15:42 +06:00
parent cee1c93d49
commit 2297c33751
6 changed files with 22 additions and 23 deletions

View File

@@ -283,10 +283,10 @@ plat_mmap(size_t size, uint8_t executable)
void *ret = mmap(0, size, PROT_READ | PROT_WRITE | (executable ? PROT_EXEC : 0), MAP_ANON | MAP_PRIVATE | (executable ? MAP_JIT : 0), 0, 0);
#else
void *ret = mmap(0, size, PROT_READ | PROT_WRITE | (executable ? PROT_EXEC : 0), MAP_ANON | MAP_PRIVATE, 0, 0);
#endif
auto retval = *reinterpret_cast<int*>(ret);
return (retval < 0) ? nullptr : ret;
#endif
#endif
}
void