mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-02-10 11:50:52 +00:00
12 lines
643 B
Diff
12 lines
643 B
Diff
--- a/src/yencode/common.h
|
|
+++ b/src/yencode/common.h
|
|
@@ -44,7 +44,7 @@
|
|
// len needs to be a multiple of alignment, although it sometimes works if it isn't...
|
|
#define ALIGN_ALLOC(buf, len, align) *(void**)&(buf) = aligned_alloc(align, ((len) + (align)-1) & ~((align)-1))
|
|
#define ALIGN_FREE free
|
|
-#elif defined(__cplusplus) && __cplusplus >= 201700
|
|
+#elif defined(__cplusplus) && __cplusplus >= 201700 && (!defined(__ANDROID__) || (defined(__ANDROID__) && __ANDROID_API__ >= 26))
|
|
// C++17 method
|
|
#include <cstdlib>
|
|
#define ALIGN_ALLOC(buf, len, align) *(void**)&(buf) = std::aligned_alloc(align, ((len) + (align)-1) & ~((align)-1))
|