From 4a93948e097e2b5ae94524cd257341ec166275d2 Mon Sep 17 00:00:00 2001 From: mangel9742 <64270333+mangel9742@users.noreply.github.com> Date: Wed, 6 Dec 2023 11:39:38 +0100 Subject: [PATCH 1/2] [update] add Android support for API 16+ --- src/c4/memory_resource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c4/memory_resource.cpp b/src/c4/memory_resource.cpp index bb63619c..cec7efa2 100644 --- a/src/c4/memory_resource.cpp +++ b/src/c4/memory_resource.cpp @@ -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); From 7618abfaf04a62f59350e2ecba0dd20f304d0d39 Mon Sep 17 00:00:00 2001 From: mangel9742 <64270333+mangel9742@users.noreply.github.com> Date: Mon, 29 Jan 2024 10:05:54 +0100 Subject: [PATCH 2/2] Update changelog/current.md --- changelog/current.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog/current.md b/changelog/current.md index 0d29ce47..8cb92fd6 100644 --- a/changelog/current.md +++ b/changelog/current.md @@ -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()`.