Commit 67859615 authored by Michael Lee's avatar Michael Lee Committed by Facebook Github Bot 1

Add APPLE to portability/Config

Summary: And use that to guard the use of posix_memalign.

Reviewed By: benyl

Differential Revision: D3081743

fb-gh-sync-id: 2c71d9cbeeaeb59d1600d486cccfc2109699ba6b
shipit-source-id: 2c71d9cbeeaeb59d1600d486cccfc2109699ba6b
parent 08a67734
...@@ -31,3 +31,7 @@ ...@@ -31,3 +31,7 @@
#ifdef __ANDROID__ #ifdef __ANDROID__
#include <android/api-level.h> #include <android/api-level.h>
#endif #endif
#ifdef __APPLE__
#include <Availability.h>
#endif
...@@ -20,8 +20,10 @@ ...@@ -20,8 +20,10 @@
namespace folly { namespace folly {
namespace detail { namespace detail {
#if _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || \ #if _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || \
(defined(__ANDROID__) && (__ANDROID_API__ > 15)) (defined(__ANDROID__) && (__ANDROID_API__ > 15)) || \
(defined(__APPLE__) && (__MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_6 || \
__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_3_0))
#include <errno.h> #include <errno.h>
// Use posix_memalign, but mimic the behaviour of memalign // Use posix_memalign, but mimic the behaviour of memalign
......
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