--- a/common/almalloc.cpp.ORIG 2020-11-04 11:00:35.000000000 +0100 +++ b/common/almalloc.cpp 2021-01-19 17:19:18.980519245 +0100 @@ -20,7 +20,7 @@ #if defined(HAVE_STD_ALIGNED_ALLOC) size = (size+(alignment-1))&~(alignment-1); - return std::aligned_alloc(alignment, size); + return ::aligned_alloc(alignment, size); #elif defined(HAVE_POSIX_MEMALIGN) void *ret{}; if(posix_memalign(&ret, alignment, size) == 0) --- a/CMakeLists.txt.ORIG 2021-01-19 17:13:01.837540027 +0100 +++ b/CMakeLists.txt 2021-01-19 17:19:03.291520110 +0100 @@ -475,7 +475,7 @@ check_cxx_source_compiles("#include int main() { - void *ptr{std::aligned_alloc(alignof(int), sizeof(int))}; + void *ptr{::aligned_alloc(alignof(int), sizeof(int))}; std::free(ptr); return 0; }" HAVE_STD_ALIGNED_ALLOC)