mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-03 14:09:31 +03:00
fix: build on newer linux distributions
Newer linux distributions correctly define PR_XXX constants. For older ones we should include <linux/prctl.h> explicitly. Fixes https://github.com/microsoft/mimalloc/issues/1065 Signed-off-by: Roman Gershman <romange@gmail.com>
This commit is contained in:
parent
af21001f7a
commit
296491e1c5
1 changed files with 6 additions and 3 deletions
|
@ -31,10 +31,13 @@ terms of the MIT license. A copy of the license can be found in the file
|
|||
|
||||
#if defined(__linux__)
|
||||
#include <features.h>
|
||||
#include <linux/prctl.h> // PR_SET_VMA
|
||||
//#if defined(MI_NO_THP)
|
||||
#include <sys/prctl.h> // THP disable
|
||||
//#endif
|
||||
|
||||
// Pick up missing definitions from linux headers.
|
||||
#if !defined(PR_SET_VMA)
|
||||
#include <linux/prctl.h> // PR_SET_VMA
|
||||
#endif
|
||||
|
||||
#if defined(__GLIBC__)
|
||||
#include <linux/mman.h> // linux mmap flags
|
||||
#else
|
||||
|
|
Loading…
Add table
Reference in a new issue