Unverified Commit 99d308ff authored by Kenton Varda's avatar Kenton Varda Committed by GitHub

Merge pull request #836 from pwrdwnsys/openbsd-aligned_alloc

Add OpenBSD to posix_memalign ifdef
parents c6d71669 73c5b9f7
......@@ -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__ || __BIONIC__
// OSX and Android lack aligned_alloc(), but have posix_memalign(). Fine.
#if __APPLE__ || __BIONIC__ || __OpenBSD__
// macOS, OpenBSD, 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