From edb63f7d8ae912c2dbdce84e617741587fe288d8 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Mon, 2 Jan 2023 15:31:27 +0000 Subject: [PATCH] Update aligned_malloc implementation on Android, so it works with API level 23 --- plugins/channelrx/demoddatv/ldpctool/layered_decoder.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/channelrx/demoddatv/ldpctool/layered_decoder.h b/plugins/channelrx/demoddatv/ldpctool/layered_decoder.h index 95ce3fc89..f17f696e0 100644 --- a/plugins/channelrx/demoddatv/ldpctool/layered_decoder.h +++ b/plugins/channelrx/demoddatv/ldpctool/layered_decoder.h @@ -18,8 +18,9 @@ namespace ldpctool { class LDPCUtil { public: -#if defined(__APPLE__) +#if defined(__APPLE__) || defined(ANDROID) // Recent versions of MacOS support aligned_alloc, but Mojave doesn't + // Likewise, API level 28 needed for aligned_alloc on Android, but we want to support 23 static void *aligned_malloc(size_t alignment, size_t size) { void *p = nullptr;