alligned_alloc is not well supported in all versions of libstdc++, for example this bug report, so some g++ versions complain that it is missing even with #include <cstdlib> and using the namespace std::aligned_alloc.
Src/libCZI/stdAllocator.cpp already contains platform specific code, so would it be possible to change the aligned_alloc call to use posix_memalign instead? Specifically, change in Src/libCZI/stdAllocator.cpp:
#if defined(__GNUC__)
//return aligned_alloc(32, size);
void *pv;
int res = posix_memalign(&pv, 32, size);
return pv;
#else
I've verified this change works with g++ 6.4 and 7.3.
I can provide a pull request if desired.
alligned_alloc is not well supported in all versions of libstdc++, for example this bug report, so some g++ versions complain that it is missing even with
#include <cstdlib>
and using the namespacestd::aligned_alloc
.Src/libCZI/stdAllocator.cpp already contains platform specific code, so would it be possible to change the aligned_alloc call to use posix_memalign instead? Specifically, change in Src/libCZI/stdAllocator.cpp:
I've verified this change works with g++ 6.4 and 7.3. I can provide a pull request if desired.