summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index d509e60fd3..ba1bbbfe08 100644
--- a/gc.c
+++ b/gc.c
@@ -49,7 +49,9 @@
# endif
#endif
#ifdef HAVE_MALLOC_USABLE_SIZE
-# ifdef HAVE_MALLOC_H
+# ifdef RUBY_ALTERNATIVE_MALLOC_HEADER
+# include RUBY_ALTERNATIVE_MALLOC_HEADER
+# elif HAVE_MALLOC_H
# include <malloc.h>
# elif defined(HAVE_MALLOC_NP_H)
# include <malloc_np.h>