diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/guardedalloc/CMakeLists.txt | 4 | ||||
-rw-r--r-- | intern/guardedalloc/intern/mallocn_intern.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/intern/guardedalloc/CMakeLists.txt b/intern/guardedalloc/CMakeLists.txt index 3329e4bf10e..89fdf367037 100644 --- a/intern/guardedalloc/CMakeLists.txt +++ b/intern/guardedalloc/CMakeLists.txt @@ -1,6 +1,10 @@ # SPDX-License-Identifier: GPL-2.0-or-later # Copyright 2006 Blender Foundation. All rights reserved. +if(HAVE_MALLOC_STATS_H) + add_definitions(-DHAVE_MALLOC_STATS_H) +endif() + set(INC . ../atomic diff --git a/intern/guardedalloc/intern/mallocn_intern.h b/intern/guardedalloc/intern/mallocn_intern.h index ce5683a04ae..1e9883f42c8 100644 --- a/intern/guardedalloc/intern/mallocn_intern.h +++ b/intern/guardedalloc/intern/mallocn_intern.h @@ -17,8 +17,7 @@ #undef HAVE_MALLOC_STATS #define USE_MALLOC_USABLE_SIZE /* internal, when we have malloc_usable_size() */ -#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \ - defined(__GLIBC__) +#if defined(HAVE_MALLOC_STATS_H) # include <malloc.h> # define HAVE_MALLOC_STATS #elif defined(__FreeBSD__) |