Update aligned_malloc implementation on Android, so it works with API level 23

pull/1554/head
Jon Beniston 2023-01-02 15:31:27 +00:00
rodzic b70496c1cc
commit edb63f7d8a
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -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;