Skip to content

Commit

Permalink
Use defined directive when checking FOLLY_SANITIZE
Browse files Browse the repository at this point in the history
Summary: Fix a `-Wundef` warning when building with `arvr/mode/platform010`.

Reviewed By: h-friederich

Differential Revision: D62103435

fbshipit-source-id: 234fd40d73d67ac717f404147159bccc0a18a8c6
  • Loading branch information
Gabriel Agamennoni authored and facebook-github-bot committed Sep 4, 2024
1 parent c4fbc82 commit 9480501
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion folly/memory/JemallocHugePageAllocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
#include <glog/logging.h>

#if (defined(MADV_HUGEPAGE) || defined(MAP_ALIGNED_SUPER)) && \
defined(FOLLY_USE_JEMALLOC) && !FOLLY_SANITIZE
defined(FOLLY_USE_JEMALLOC) && \
(!defined(FOLLY_SANITIZE) || !FOLLY_SANITIZE)

#if defined(__FreeBSD__) || (JEMALLOC_VERSION_MAJOR >= 5)
#define FOLLY_JEMALLOC_HUGE_PAGE_ALLOCATOR_SUPPORTED 1
Expand Down
2 changes: 1 addition & 1 deletion folly/memory/JemallocNodumpAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <folly/portability/Config.h>
#include <folly/portability/Malloc.h>

#if defined(FOLLY_USE_JEMALLOC) && !FOLLY_SANITIZE
#if defined(FOLLY_USE_JEMALLOC) && (!defined(FOLLY_SANITIZE) || !FOLLY_SANITIZE)

#include <folly/portability/SysMman.h>

Expand Down
2 changes: 1 addition & 1 deletion folly/memory/test/MallctlHelperTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <folly/memory/Malloc.h>
#include <folly/portability/GTest.h>

#if defined(FOLLY_USE_JEMALLOC) && !FOLLY_SANITIZE
#if defined(FOLLY_USE_JEMALLOC) && (!defined(FOLLY_SANITIZE) || !FOLLY_SANITIZE)
#include <jemalloc/jemalloc.h>
#endif

Expand Down

0 comments on commit 9480501

Please sign in to comment.