We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a6e442 commit 1146b45Copy full SHA for 1146b45
src/vk_mem_alloc.h
@@ -2798,7 +2798,19 @@ remove them if not needed.
2798
#define VMA_NULL nullptr
2799
#endif
2800
2801
-#if defined(__APPLE__) || defined(__ANDROID__)
+#if defined(__ANDROID_API__) && (__ANDROID_API__ < 16)
2802
+#include <cstdlib>
2803
+void *aligned_alloc(size_t alignment, size_t size)
2804
+{
2805
+ // alignment must be >= sizeof(void*)
2806
+ if(alignment < sizeof(void*))
2807
+ {
2808
+ alignment = sizeof(void*);
2809
+ }
2810
+
2811
+ return memalign(alignment, size);
2812
+}
2813
+#elif defined(__APPLE__) || defined(__ANDROID__)
2814
#include <cstdlib>
2815
void *aligned_alloc(size_t alignment, size_t size)
2816
{
0 commit comments