Skip to content

Commit

Permalink
Fix folly on OSX and BSD in prep for FastCGI on HHVM
Browse files Browse the repository at this point in the history
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: facebook/hhvm#2944 (comment)

Closes #67

GitHub Author: Daniel Sloof <[email protected]>

@override-unit-failures

Test Plan: fbmake runtests 100%

Reviewed By: [email protected], [email protected]

FB internal diff: D1407393
  • Loading branch information
JoelMarcey authored and Gownta committed Jun 27, 2014
1 parent a181fa0 commit 75f93a6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions folly/MemoryMapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "folly/MemoryMapping.h"
#include "folly/Format.h"
#include "folly/Portability.h"

#ifdef __linux__
#include "folly/experimental/io/HugePages.h"
Expand Down
10 changes: 10 additions & 0 deletions folly/Portability.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@
#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
#ifdef __GNUC__
Expand Down

0 comments on commit 75f93a6

Please sign in to comment.