Commit 75f93a66 authored by Joel Marcey's avatar Joel Marcey Committed by Nicholas Ormrod

Fix folly on OSX and BSD in prep for FastCGI on HHVM

Summary:
A recent change in folly/MemoryMapping.cpp uses MAP_ANONYMOUS, which is
named MAP_ANON on OSX/BSD.

We need folly and third-party changes in order to land a pull request for HHVM
that starts to get FastCGI running on OSX.

See the checklist of the HHVM pull request here: https://github.com/facebook/hhvm/pull/2944#issuecomment-47281003

Closes #67

GitHub Author: Daniel Sloof <goapsychadelic@gmail.com>

@override-unit-failures

Test Plan: fbmake runtests 100%

Reviewed By: pt@fb.com, njormrod@fb.com

FB internal diff: D1407393
parent a181fa04
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "folly/MemoryMapping.h" #include "folly/MemoryMapping.h"
#include "folly/Format.h" #include "folly/Format.h"
#include "folly/Portability.h"
#ifdef __linux__ #ifdef __linux__
#include "folly/experimental/io/HugePages.h" #include "folly/experimental/io/HugePages.h"
......
...@@ -34,6 +34,16 @@ ...@@ -34,6 +34,16 @@
#endif #endif
#endif #endif
// A change in folly/MemoryMapping.cpp uses MAP_ANONYMOUS, which is named
// MAP_ANON on OSX/BSD.
#if defined(__APPLE__) || defined(__FreeBSD__)
#include <sys/mman.h>
#ifndef MAP_ANONYMOUS
#ifdef MAP_ANON
#define MAP_ANONYMOUS MAP_ANON
#endif
#endif
#endif
// MaxAlign: max_align_t isn't supported by gcc // MaxAlign: max_align_t isn't supported by gcc
#ifdef __GNUC__ #ifdef __GNUC__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment