aboutsummaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index 0e6aad6f14..ddf607ce20 100644
--- a/gc.c
+++ b/gc.c
@@ -39,12 +39,18 @@
# ifdef _WIN32
# define HAVE_MALLOC_USABLE_SIZE
# define malloc_usable_size(a) _msize(a)
+# elif defined HAVE_MALLOC_SIZE
+# define HAVE_MALLOC_USABLE_SIZE
+# define malloc_usable_size(a) malloc_size(a)
# endif
-#else
+#endif
+#ifdef HAVE_MALLOC_USABLE_SIZE
# ifdef HAVE_MALLOC_H
# include <malloc.h>
# elif defined(HAVE_MALLOC_NP_H)
# include <malloc_np.h>
+# elif defined(HAVE_MALLOC_MALLOC_H)
+# include <malloc/malloc.h>
# endif
#endif