From c927cc44bd6f979b5d5f48f8b91a5c36dab6d6c8 Mon Sep 17 00:00:00 2001 From: Sergey Alexandrov Date: Mon, 26 Jun 2017 15:56:48 +0200 Subject: [PATCH] Fix aligned_malloc for mingw platform --- common/include/pcl/pcl_macros.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/include/pcl/pcl_macros.h b/common/include/pcl/pcl_macros.h index bc2d54f3dbf..21952bec9c3 100644 --- a/common/include/pcl/pcl_macros.h +++ b/common/include/pcl/pcl_macros.h @@ -377,6 +377,10 @@ log2f (float x) #define MALLOC_ALIGNED 1 #endif +#if defined (HAVE_MM_MALLOC) + #include +#endif + inline void* aligned_malloc (size_t size) { @@ -405,7 +409,7 @@ aligned_free (void* ptr) #if defined (MALLOC_ALIGNED) || defined (HAVE_POSIX_MEMALIGN) std::free (ptr); #elif defined (HAVE_MM_MALLOC) - ptr = _mm_free (ptr); + _mm_free (ptr); #elif defined (_MSC_VER) _aligned_free (ptr); #elif defined (ANDROID)