From 6f5ba0bf5bcb763c656743078c05fd3868f290dd Mon Sep 17 00:00:00 2001 From: Bernard Spil Date: Fri, 19 Jan 2018 17:07:52 -0800 Subject: [PATCH] Fix building on FreeBSD Summary: FreeBSD uses jemalloc as the base malloc implementation. The patch has been functional on FreeBSD as of the MariaDB 10.2 port. Closes https://github.com/facebook/rocksdb/pull/3386 Differential Revision: D6765742 Pulled By: yiwu-arbug fbshipit-source-id: d55dbc082eecf640ef3df9a21f26064ebe6587e8 --- db/malloc_stats.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/db/malloc_stats.cc b/db/malloc_stats.cc index 7acca6512..cca83606f 100644 --- a/db/malloc_stats.cc +++ b/db/malloc_stats.cc @@ -16,8 +16,13 @@ namespace rocksdb { #ifdef ROCKSDB_JEMALLOC +#ifdef __FreeBSD__ +#include +#define je_malloc_stats_print malloc_stats_print +#else #include "jemalloc/jemalloc.h" - +#endif + typedef struct { char* cur; char* end;