Skip to content

Commit

Permalink
Merge pull request #129 from Airudit/fix/android-compilation
Browse files Browse the repository at this point in the history
[update] add Android support for API 16+
  • Loading branch information
biojppm authored Mar 8, 2024
2 parents cb4d743 + 7618abf commit e55d82c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog/current.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ assert(to_substr((char*)ptr).len == 3); // as before
### Fixes
- [PR#129](https://github.com/biojppm/c4core/pull/129) - Support android by enabling `aalloc()`'s call to `memalign()`, available for API 16+.
- [PR#115](https://github.com/biojppm/c4core/pull/115) - Refactor of `c4::blob`/`c4::cblob`. Use SFINAE to invalidate some of the constructors.
- [PR#110](https://github.com/biojppm/c4core/pull/110)/[PR#107](https://github.com/biojppm/c4core/pull/107) - Update fast_float.
- [PR#108](https://github.com/biojppm/c4core/pull/108) - Fix preprocessor concatenation of strings in `C4_NOT_IMPLEMENTED_MSG()` and `C4_NOT_IMPLEMENTED_IF_MSG()`.
Expand Down
2 changes: 1 addition & 1 deletion src/c4/memory_resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void* aalloc_impl(size_t size, size_t alignment)
#if defined(C4_WIN) || defined(C4_XBOX)
mem = ::_aligned_malloc(size, alignment);
C4_CHECK(mem != nullptr || size == 0);
#elif defined(C4_ARM)
#elif defined(C4_ARM) || defined(C4_ANDROID)
// https://stackoverflow.com/questions/53614538/undefined-reference-to-posix-memalign-in-arm-gcc
// https://electronics.stackexchange.com/questions/467382/e2-studio-undefined-reference-to-posix-memalign/467753
mem = memalign(alignment, size);
Expand Down

0 comments on commit e55d82c

Please sign in to comment.