From: Peter Griess <pgriess@fb.com>
Date: Thu, 26 Sep 2013 15:09:19 +0000 (-0500)
Subject: Apple defines MAP_ANON, not MAP_ANONYMOUS
X-Git-Tag: v0.22.0~845
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c8b43b85d9735d646646aec8e9623067dacc4e27;p=folly.git

Apple defines MAP_ANON, not MAP_ANONYMOUS

Summary:
- Linux considers MAP_ANON deprecated, but it's all that Apple defines.
Manually set up a mapping of one to the other.

Test Plan:
- fbconfig -r folly && fbmake runtests
- ./configure && make check on Ubuntu/FC/Mac

Reviewed By: mwang@fb.com

FB internal diff: D998511
---

diff --git a/folly/test/AtomicHashArrayTest.cpp b/folly/test/AtomicHashArrayTest.cpp
index fa6b78de..2d03a08e 100644
--- a/folly/test/AtomicHashArrayTest.cpp
+++ b/folly/test/AtomicHashArrayTest.cpp
@@ -26,6 +26,10 @@
 #include "folly/Memory.h"
 #include <gtest/gtest.h>
 
+#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
+#define MAP_ANONYMOUS MAP_ANON
+#endif
+
 using namespace std;
 using namespace folly;