Skip to content

Commit

Permalink
Fix compile error with clang15 on MacOS
Browse files Browse the repository at this point in the history
Signed-off-by: Enwei Jiao <[email protected]>
  • Loading branch information
jiaoew1991 committed Nov 2, 2023
1 parent dc7f7d7 commit e47b975
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions folly/Memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,18 @@
#include <folly/portability/Config.h>
#include <folly/portability/Malloc.h>

#ifdef __APPLE__
#include <AvailabilityMacros.h>
#endif

namespace folly {

#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \
(defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600) || \
(defined(__ANDROID__) && (__ANDROID_API__ > 16)) || \
(defined(__APPLE__) && \
(__MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_6 || \
__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_3_0)) || \
(MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_6 || \
IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_3_0)) || \
defined(__FreeBSD__) || defined(__wasm32__)

inline void* aligned_malloc(size_t size, size_t align) {
Expand Down

0 comments on commit e47b975

Please sign in to comment.