Skip to content

Commit

Permalink
Merge pull request #706 from leapmotion/fix-android
Browse files Browse the repository at this point in the history
Fix Android build break
  • Loading branch information
Jonathan Marsden committed Jul 31, 2015
2 parents 28abc24 + fa6ec5f commit a327059
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/autowiring/CreationRulesUnix.cpp
Expand Up @@ -4,10 +4,14 @@
#include <cstdlib>

void* autowiring::aligned_malloc(size_t ncb, size_t align) {
#if _POSIX_C_SOURCE < 200112L && _XOPEN_SOURCE < 600 && !defined(__APPLE__)
return memalign(align, ncb);
#else
void* pRetVal;
if(posix_memalign(&pRetVal, align, ncb))
if (posix_memalign(&pRetVal, align, ncb))
return nullptr;
return pRetVal;
#endif
}

void autowiring::aligned_free(void* ptr) {
Expand Down

0 comments on commit a327059

Please sign in to comment.