From ef5078604ab2e5b30dc4de8f9800b44df45ec9e9 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 11 Mar 2025 08:59:26 -0600 Subject: [PATCH] Add a necessary header include. --- source/base/utilities.cc | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/source/base/utilities.cc b/source/base/utilities.cc index e41b50f622..b72e1c71cf 100644 --- a/source/base/utilities.cc +++ b/source/base/utilities.cc @@ -14,13 +14,6 @@ #include -// It's necessary to include winsock2.h before thread_local_storage.h, -// because Intel implementation of TBB includes winsock.h, -// and we'll get a conflict between winsock.h and winsock2.h otherwise. -#ifdef DEAL_II_MSVC -# include -#endif - #include #include #include @@ -63,6 +56,19 @@ # include #endif +// It's necessary to include winsock2.h before thread_local_storage.h, +// because Intel implementation of TBB includes winsock.h, +// and we'll get a conflict between winsock.h and winsock2.h otherwise. +#ifdef DEAL_II_MSVC +# include +#endif + +#ifndef DEAL_II_MSVC +// On Unix-type systems, we use posix-memalign: +# include +#endif + + DEAL_II_NAMESPACE_OPEN @@ -1091,7 +1097,7 @@ namespace Utilities #else // Windows does not appear to have posix_memalign. just use the // regular malloc in that case - *memptr = malloc(size); + *memptr = std::malloc(size); (void)alignment; AssertThrow(*memptr != nullptr, ExcOutOfMemory(size)); #endif -- 2.39.5