Skip to content

Commit

Permalink
Fix for __DARWIN_ALIGN32 on macOS < 11
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Jun 8, 2024
1 parent 4db31bf commit b345eea
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions folly/io/async/fdsock/AsyncFdSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@
#include <folly/io/async/AsyncSocket.h>
#include <folly/io/async/fdsock/SocketFds.h>

#ifdef __APPLE__
#include <AvailabilityMacros.h>
#if MAC_OS_X_VERSION_MIN_REQUIRED < 110000
#ifdef __DARWIN_ALIGN32
#undef __DARWIN_ALIGN32
#define __DARWIN_ALIGN32(p) ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32)
#endif
#endif
#endif

namespace folly {

// Including `gtest/gtest_prod.h` would make gtest/gmock a hard dep
Expand Down

0 comments on commit b345eea

Please sign in to comment.