diff options
author | Daniel Black <daniel@mariadb.org> | 2020-11-19 07:46:27 +1100 |
---|---|---|
committer | Daniel Black <daniel@mariadb.org> | 2020-11-19 16:30:17 +1100 |
commit | 3b486c28f710940631b5cb7a9781965827fbfa4b (patch) | |
tree | 1f82116b58dda2bf42594c8989afcf092f4531b5 | |
parent | 33d41167c54fed9116cd8f0dfa01b43733988e6d (diff) | |
download | mariadb-git-3b486c28f710940631b5cb7a9781965827fbfa4b.tar.gz |
MDEV-24125: linux large pages, linux/mman.h needed
Centos/RHEL7 have the MAP_HUGE_SHIFT constant
defined in linux/mman.h which needed to get included.
-rw-r--r-- | cmake/os/WindowsCache.cmake | 1 | ||||
-rw-r--r-- | config.h.cmake | 1 | ||||
-rw-r--r-- | configure.cmake | 1 | ||||
-rw-r--r-- | mysys/my_largepage.c | 3 |
4 files changed, 6 insertions, 0 deletions
diff --git a/cmake/os/WindowsCache.cmake b/cmake/os/WindowsCache.cmake index 4d3b2af575e..91e01708dce 100644 --- a/cmake/os/WindowsCache.cmake +++ b/cmake/os/WindowsCache.cmake @@ -83,6 +83,7 @@ SET(HAVE_IPV6_V6ONLY 1 CACHE INTERNAL "") SET(HAVE_LANGINFO_H CACHE INTERNAL "") SET(HAVE_LDIV 1 CACHE INTERNAL "") SET(HAVE_LIMITS_H 1 CACHE INTERNAL "") +SET(HAVE_LINUX_MMAN_H CACHE INTERNAL "") SET(HAVE_LOCALE_H 1 CACHE INTERNAL "") SET(HAVE_LOCALTIME_R 1 CACHE INTERNAL "") SET(HAVE_LRAND48 CACHE INTERNAL "") diff --git a/config.h.cmake b/config.h.cmake index 5a48df0a135..55c51efda68 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -42,6 +42,7 @@ #cmakedefine HAVE_LIMITS_H 1 #cmakedefine HAVE_LINK_H 1 #cmakedefine HAVE_LINUX_UNISTD_H 1 +#cmakedefine HAVE_LINUX_MMAN_H 1 #cmakedefine HAVE_LOCALE_H 1 #cmakedefine HAVE_MALLOC_H 1 #cmakedefine HAVE_MEMORY_H 1 diff --git a/configure.cmake b/configure.cmake index 64be91606ae..4fc324a9567 100644 --- a/configure.cmake +++ b/configure.cmake @@ -223,6 +223,7 @@ CHECK_INCLUDE_FILES (sys/fpu.h HAVE_SYS_FPU_H) CHECK_INCLUDE_FILES (sys/ioctl.h HAVE_SYS_IOCTL_H) CHECK_INCLUDE_FILES ("sys/types.h;sys/malloc.h" HAVE_SYS_MALLOC_H) CHECK_INCLUDE_FILES (sys/mman.h HAVE_SYS_MMAN_H) +CHECK_INCLUDE_FILES (linux/mman.h HAVE_LINUX_MMAN_H) CHECK_INCLUDE_FILES (sys/prctl.h HAVE_SYS_PRCTL_H) CHECK_INCLUDE_FILES (sys/resource.h HAVE_SYS_RESOURCE_H) CHECK_INCLUDE_FILES (sys/select.h HAVE_SYS_SELECT_H) diff --git a/mysys/my_largepage.c b/mysys/my_largepage.c index 9efd0797860..c3fc97ffe0a 100644 --- a/mysys/my_largepage.c +++ b/mysys/my_largepage.c @@ -23,6 +23,9 @@ #if defined(__linux__) || defined(MAP_ALIGNED) #include "my_bit.h" #endif +#ifdef HAVE_LINUX_MMAN_H +#include <linux/mman.h> +#endif #ifdef HAVE_SOLARIS_LARGE_PAGES #if defined(__sun__) && defined(__GNUC__) && defined(__cplusplus) \ |