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
This commit is contained in:
Bernard Spil 2018-01-19 17:07:52 -08:00 committed by Facebook Github Bot
parent f2f034ef3b
commit 6f5ba0bf5b
1 changed files with 6 additions and 1 deletions

View File

@ -16,8 +16,13 @@
namespace rocksdb {
#ifdef ROCKSDB_JEMALLOC
#ifdef __FreeBSD__
#include <malloc_np.h>
#define je_malloc_stats_print malloc_stats_print
#else
#include "jemalloc/jemalloc.h"
#endif
typedef struct {
char* cur;
char* end;