mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-06 15:29:31 +03:00
unix: only include linux headers on glibc
On musl-libc the required types for `prctl` are defined in `sys/prctl.h` and including `linux/prctl.h` fails either because the file does not exist or because it redefines the types.
This commit is contained in:
parent
af21001f7a
commit
4b4642f28e
1 changed files with 1 additions and 1 deletions
|
@ -31,11 +31,11 @@ terms of the MIT license. A copy of the license can be found in the file
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
#include <features.h>
|
#include <features.h>
|
||||||
#include <linux/prctl.h> // PR_SET_VMA
|
|
||||||
//#if defined(MI_NO_THP)
|
//#if defined(MI_NO_THP)
|
||||||
#include <sys/prctl.h> // THP disable
|
#include <sys/prctl.h> // THP disable
|
||||||
//#endif
|
//#endif
|
||||||
#if defined(__GLIBC__)
|
#if defined(__GLIBC__)
|
||||||
|
#include <linux/prctl.h> // PR_SET_VMA
|
||||||
#include <linux/mman.h> // linux mmap flags
|
#include <linux/mman.h> // linux mmap flags
|
||||||
#else
|
#else
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
Loading…
Add table
Reference in a new issue