Skip to content

Commit

Permalink
Fix build failures due to missing JEMALLOC_CXX_THROW macro (facebook#…
Browse files Browse the repository at this point in the history
…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 facebook#4869
Pull Request resolved: facebook#5053

Differential Revision: D14390034

Pulled By: sagar0

fbshipit-source-id: b2b7a03cd377201ef385eb521f65bae85c558055
  • Loading branch information
Yi Wu authored and absolute8511 committed Apr 10, 2019
1 parent fa91151 commit b27d508
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions port/jemalloc_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
#include <jemalloc/jemalloc.h>
#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__));
Expand Down

0 comments on commit b27d508

Please sign in to comment.