summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-22 00:05:34 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-22 00:05:34 +0000
commit215a7da2a6584295ff9bfaa5e0c4de051d831d2c (patch)
treef05cd31de98bd9de498c6330ff9c412615a6d7ef /gc.c
parent62d6fc31c7b8d55cdb690833d2cebda6f2e3c136 (diff)
* gc.c: fix build failure on FreeBSD introduced by r43763.
malloc_usable_size() is defined by malloc_np.h on FreeBSD. * configure.in: check malloc.h and malloc_np.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index d34ff9c4de..0f111cdbf3 100644
--- a/gc.c
+++ b/gc.c
@@ -40,7 +40,11 @@
# define malloc_usable_size(a) _msize(a)
# endif
#else
-# include <malloc.h>
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# elif defined(HAVE_MALLOC_NP_H)
+# include <malloc_np.h>
+# endif
#endif
#if /* is ASAN enabled? */ \