Files
MINGW-packages/mingw-w64-embree/002-arm64-no-mm-malloc.patch
Christoph Reiter 332081dc35 embree: fix build error with clangarm64 due to missing _mm_malloc
It was removed in https://github.com/mingw-w64/mingw-w64/commit/6affcc5d15b9caabb5891a
Let's just used the default Windows API for this in all cases.
2023-08-05 10:44:54 +02:00

20 lines
458 B
Diff

--- embree-4.2.0/common/sys/alloc.cpp.orig 2023-07-04 11:17:39.000000000 +0200
+++ embree-4.2.0/common/sys/alloc.cpp 2023-08-05 10:41:18.866068400 +0200
@@ -56,7 +56,15 @@
}
#endif
-
+
+#ifdef _WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+
+#define _mm_malloc(size, alignment) _aligned_malloc(size, alignment)
+#define _mm_free(ptr) _aligned_free(ptr)
+#endif
+
void* alignedMalloc(size_t size, size_t align)
{
if (size == 0)