mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-05 23:19:31 +03:00
Merge pull request #278 from devnexen/illumos_prevent_some_flags
some apis are available on Illumos which are not available on stock S…
This commit is contained in:
commit
3d0b91457e
2 changed files with 13 additions and 0 deletions
8
src/os.c
8
src/os.c
|
@ -8,6 +8,14 @@ terms of the MIT license. A copy of the license can be found in the file
|
||||||
#define _DEFAULT_SOURCE // ensure mmap flags are defined
|
#define _DEFAULT_SOURCE // ensure mmap flags are defined
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__sun)
|
||||||
|
// illumos provides new mman.h api when any of these are defined
|
||||||
|
// otherwise the old api based on caddr_t which predates the void pointers one.
|
||||||
|
// stock solaris provides only the former, chose to atomically to discard those
|
||||||
|
// flags only here rather than project wide tough.
|
||||||
|
#undef _XOPEN_SOURCE
|
||||||
|
#undef _POSIX_C_SOURCE
|
||||||
|
#endif
|
||||||
#include "mimalloc.h"
|
#include "mimalloc.h"
|
||||||
#include "mimalloc-internal.h"
|
#include "mimalloc-internal.h"
|
||||||
#include "mimalloc-atomic.h"
|
#include "mimalloc-atomic.h"
|
||||||
|
|
|
@ -5,6 +5,11 @@ terms of the MIT license. A copy of the license can be found in the file
|
||||||
"LICENSE" at the root of this distribution.
|
"LICENSE" at the root of this distribution.
|
||||||
-----------------------------------------------------------------------------*/
|
-----------------------------------------------------------------------------*/
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
|
#if defined(__sun)
|
||||||
|
// same remarks as os.c for the static's context.
|
||||||
|
#undef _XOPEN_SOURCE
|
||||||
|
#undef _POSIX_C_SOURCE
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mimalloc.h"
|
#include "mimalloc.h"
|
||||||
#include "mimalloc-internal.h"
|
#include "mimalloc-internal.h"
|
||||||
|
|
Loading…
Add table
Reference in a new issue