Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[update] add Android support for API 16+ #129

Merged
merged 2 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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