Skip to content

Commit 2eb3574

Browse files
alarixniagrooverdan
authored andcommitted
my_largepage: Fix build with MAP_ALIGNED by no MAP_ALIGNED_SUPER
This needs backporting to MariaDB 10.5. Any changes I submit are freely available under the new BSD license. Signed-off-by: Nia Alarie <[email protected]>
1 parent c80cecb commit 2eb3574

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mysys/my_largepage.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,10 @@ uchar *my_large_malloc(size_t *size, myf my_flags)
336336
# warning "No explicit large page (HUGETLB pages) support in Linux < 3.8"
337337
#endif
338338
#elif defined(MAP_ALIGNED)
339-
mapflag|= MAP_ALIGNED_SUPER |
340-
MAP_ALIGNED(my_bit_log2_size_t(large_page_size));
339+
mapflag|= MAP_ALIGNED(my_bit_log2_size_t(large_page_size));
340+
#if defined(MAP_ALIGNED_SUPER)
341+
mapflag|= MAP_ALIGNED_SUPER;
342+
#endif
341343
#endif
342344
aligned_size= MY_ALIGN(*size, (size_t) large_page_size);
343345
}

0 commit comments

Comments
 (0)