From b71a1b76b3dd7d63bc1d27ed292ddb604fdd9388 Mon Sep 17 00:00:00 2001 From: Igor Sugak Date: Thu, 30 Nov 2017 14:48:24 -0800 Subject: [PATCH] fix build when sanitizers are enabled and jemalloc is disabled Summary: Add preprocessor checks to guard jemalloc headers if any sanitizer is enabled. Reviewed By: yfeldblum Differential Revision: D6441578 fbshipit-source-id: 85364fca5af33c95cd05f232d1e3f9cbac9a4120 --- folly/experimental/JemallocNodumpAllocator.h | 3 ++- folly/memory/test/MallctlHelperTest.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/folly/experimental/JemallocNodumpAllocator.h b/folly/experimental/JemallocNodumpAllocator.h index 93b14f79..16d6aec8 100644 --- a/folly/experimental/JemallocNodumpAllocator.h +++ b/folly/experimental/JemallocNodumpAllocator.h @@ -18,9 +18,10 @@ #pragma once +#include #include -#ifdef FOLLY_HAVE_LIBJEMALLOC +#if defined(FOLLY_HAVE_LIBJEMALLOC) && !defined(FOLLY_SANITIZE) #include #include diff --git a/folly/memory/test/MallctlHelperTest.cpp b/folly/memory/test/MallctlHelperTest.cpp index dc447a7a..0b5444c8 100644 --- a/folly/memory/test/MallctlHelperTest.cpp +++ b/folly/memory/test/MallctlHelperTest.cpp @@ -15,11 +15,12 @@ */ #include +#include #include #include #include -#ifdef FOLLY_HAVE_LIBJEMALLOC +#if defined(FOLLY_HAVE_LIBJEMALLOC) && !defined(FOLLY_SANITIZE) #include #endif -- 2.34.1