Unverified Commit 8a0d5f18 authored by Kenton Varda's avatar Kenton Varda Committed by GitHub

Merge pull request #728 from bazurbat/master

Two fixes for build failure on Android (resubmit)
parents cad2304f 8d5b6365
......@@ -72,6 +72,11 @@ namespace {
#undef SEEK_HOLE
#endif
#if __BIONIC__
// No no DTTOIF function
#undef DT_UNKNOWN
#endif
static void setCloexec(int fd) KJ_UNUSED;
static void setCloexec(int fd) {
// Set the O_CLOEXEC flag on the given fd.
......
......@@ -288,8 +288,8 @@ void BTreeImpl::growTree(uint minCapacity) {
// aligned_alloc() function. Unfortunately, many platforms don't implement it. Luckily, there
// are usually alternatives.
#if __APPLE__
// OSX lacks aligned_alloc(), but has posix_memalign(). Fine.
#if __APPLE__ || __BIONIC__
// OSX and Android lack aligned_alloc(), but have posix_memalign(). Fine.
void* allocPtr;
int error = posix_memalign(&allocPtr,
sizeof(BTreeImpl::NodeUnion), newCapacity * sizeof(BTreeImpl::NodeUnion));
......
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