Skip to content

Commit 7170e35

Browse files
committed
Fix for windows
1 parent cd44cad commit 7170e35

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/util/rbs_allocator.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ struct rbs_allocator {
2929
};
3030

3131
static void *portable_mmap_anon(size_t size) {
32+
#ifdef _WIN32
33+
/* Windows doesn't use this function - VirtualAlloc is used instead */
34+
return NULL;
35+
#else
3236
void *ptr;
3337

3438
#if defined(MAP_ANONYMOUS)
@@ -45,6 +49,7 @@ static void *portable_mmap_anon(size_t size) {
4549
#endif
4650

4751
return ptr;
52+
#endif
4853
}
4954

5055
static size_t get_system_page_size(void) {

0 commit comments

Comments
 (0)