From: Wolfgang Bangerth Date: Tue, 11 Mar 2025 14:59:26 +0000 (-0600) Subject: Add a necessary header include. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F18234%2Fhead;p=dealii.git Add a necessary header include. --- 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