mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Oops, heh, made a small mistake there regarding MAP_ANON
This commit is contained in:
parent
86b3116f6b
commit
4f02be0e67
@ -29,6 +29,10 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
||||||
|
#ifndef MAP_ANON
|
||||||
|
#define MAP_ANON 0x1000
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // WIN32
|
#endif // WIN32
|
||||||
|
|
||||||
|
|
||||||
@ -447,7 +451,7 @@ mmap_alloc(size_t size, bool allow_exec) {
|
|||||||
if (allow_exec) {
|
if (allow_exec) {
|
||||||
prot |= PROT_EXEC;
|
prot |= PROT_EXEC;
|
||||||
}
|
}
|
||||||
void *ptr = mmap(NULL, size, prot, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
|
void *ptr = mmap(NULL, size, prot, MAP_PRIVATE | MAP_ANON, -1, 0);
|
||||||
if (ptr == (void *)-1) {
|
if (ptr == (void *)-1) {
|
||||||
perror("mmap");
|
perror("mmap");
|
||||||
abort();
|
abort();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user