From 371e5d273f616c0c83a5fe41b0c21510ee4e4f14 Mon Sep 17 00:00:00 2001 From: Daniel Sloof Date: Thu, 26 Jun 2014 23:07:08 +0200 Subject: [PATCH] fix folly build on OSX and BSD A recent change in folly/MemoryMapping.cpp uses MAP_ANONYMOUS, which is named MAP_ANON on OSX/BSD. --- folly/MemoryMapping.cpp | 1 + folly/Portability.h | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/folly/MemoryMapping.cpp b/folly/MemoryMapping.cpp index 17f06be3ba6..a6ad326a093 100644 --- a/folly/MemoryMapping.cpp +++ b/folly/MemoryMapping.cpp @@ -16,6 +16,7 @@ #include "folly/MemoryMapping.h" #include "folly/Format.h" +#include "folly/Portability.h" #ifdef __linux__ #include "folly/experimental/io/HugePages.h" diff --git a/folly/Portability.h b/folly/Portability.h index 68d7d969e9d..1a129ca1ccf 100644 --- a/folly/Portability.h +++ b/folly/Portability.h @@ -34,6 +34,12 @@ #endif #endif +#ifndef MAP_ANONYMOUS + #include + #ifdef MAP_ANON + #define MAP_ANONYMOUS MAP_ANON + #endif +#endif // MaxAlign: max_align_t isn't supported by gcc #ifdef __GNUC__