From d07167c9a3430eacddafc81f2e23bacfdc4c5933 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Fri, 8 Mar 2019 17:02:00 -0800 Subject: [PATCH] Fix build failures due to missing JEMALLOC_CXX_THROW macro (#5053) Summary: JEMALLOC_CXX_THROW is not defined for earlier versions of jemalloc (e.g. 3.6), causing builds to fail on some platforms. Fixing it. Closes #4869 Pull Request resolved: https://github.com/facebook/rocksdb/pull/5053 Differential Revision: D14390034 Pulled By: sagar0 fbshipit-source-id: b2b7a03cd377201ef385eb521f65bae85c558055 --- HISTORY.md | 2 ++ port/jemalloc_helper.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index a85e864b4..cf858b385 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,12 +1,14 @@ # Rocksdb Change Log ## 5.18.4 (3/3/2020) * Various fixes for ARM64 support (#6250) +* Fix JEMALLOC_CXX_THROW macro missing from older Jemalloc versions, causing build failures on some platforms. ## 5.18.3 (2/11/2019) ### Bug Fixes * Fix possible LSM corruption when both range deletions and subcompactions are used. The symptom of this corruption is L1+ files overlapping in the user key space. ## 5.18.2 (01/31/2019) + ### Public API Change * Change time resolution in FileOperationInfo. * Deleting Blob files also go through SStFileManager. diff --git a/port/jemalloc_helper.h b/port/jemalloc_helper.h index 412a80d26..0c216face 100644 --- a/port/jemalloc_helper.h +++ b/port/jemalloc_helper.h @@ -12,6 +12,10 @@ #include #endif +#ifndef JEMALLOC_CXX_THROW +#define JEMALLOC_CXX_THROW +#endif + // Declare non-standard jemalloc APIs as weak symbols. We can null-check these // symbols to detect whether jemalloc is linked with the binary. extern "C" void* mallocx(size_t, int) __attribute__((__weak__));