aboutsummaryrefslogtreecommitdiff
path: root/src/common_memory.cpp
diff options
context:
space:
mode:
authorAndreas T Jonsson <mail@andreasjonsson.se>2024-04-25 22:04:40 +0200
committerAndreas T Jonsson <mail@andreasjonsson.se>2024-04-25 22:04:40 +0200
commit9a008d10f3d8f97ff11ba948d6939bec7e6beb6d (patch)
tree8b2fd91da22620b6e0a7158a66429f1af4aca210 /src/common_memory.cpp
parent3000508c027c9d30c168266d0ae276cc14de3982 (diff)
parentf745fff640ab1582bdfdd18a7239c58fa37db753 (diff)
Merge branch 'master' into netbsd
Diffstat (limited to 'src/common_memory.cpp')
-rw-r--r--src/common_memory.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common_memory.cpp b/src/common_memory.cpp
index c6ee88f03..60e570eee 100644
--- a/src/common_memory.cpp
+++ b/src/common_memory.cpp
@@ -163,6 +163,10 @@ gb_internal void platform_virtual_memory_protect(void *memory, isize size);
GB_ASSERT(is_protected);
}
#else
+ #if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
+ #define MAP_ANONYMOUS MAP_ANON
+ #endif
+
gb_internal void platform_virtual_memory_init(void) {
global_platform_memory_block_sentinel.prev = &global_platform_memory_block_sentinel;
global_platform_memory_block_sentinel.next = &global_platform_memory_block_sentinel;