From c4411b2305e15216146c84e81de6ed7eb3950816 Mon Sep 17 00:00:00 2001 From: Marcin Wojdyr Date: Thu, 26 Aug 2021 02:27:33 +0200 Subject: [PATCH] pocketfft_hdronly.h: one more condition for aligned_alloc --- include/gemmi/third_party/pocketfft_hdronly.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/gemmi/third_party/pocketfft_hdronly.h b/include/gemmi/third_party/pocketfft_hdronly.h index 54ae9fec0..279ad26f4 100644 --- a/include/gemmi/third_party/pocketfft_hdronly.h +++ b/include/gemmi/third_party/pocketfft_hdronly.h @@ -156,8 +156,10 @@ template class arr } static void dealloc(T *ptr) { free(ptr); } + // aligned_alloc is missing in many C++17 compilers #elif __cplusplus >= 201703L && !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) && \ !defined(__APPLE__) && \ + (!defined(__GLIBC_MINOR__) || __GLIBC__-0 != 2 || __GLIBC_MINOR__ >= 16) && \ (!defined(__MINGW32__) || defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)) static T *ralloc(size_t num) {