From c6a5137492f04c97c3e991f6a2b4d8cf3e2fc516 Mon Sep 17 00:00:00 2001 From: yamashi Date: Tue, 22 Dec 2020 16:13:44 +0100 Subject: [PATCH] Fix packaging & mac build --- Code/core/src/StandardAllocator.cpp | 6 ++++++ xmake.lua | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Code/core/src/StandardAllocator.cpp b/Code/core/src/StandardAllocator.cpp index 512b503..8219560 100644 --- a/Code/core/src/StandardAllocator.cpp +++ b/Code/core/src/StandardAllocator.cpp @@ -1,7 +1,11 @@ #include "StandardAllocator.hpp" #include +#ifndef __APPLE__ +#include +#else #include +#endif namespace TiltedPhoques { @@ -23,6 +27,8 @@ namespace TiltedPhoques return _msize(apData); #elif __linux__ return malloc_usable_size(apData); +#elif __APPLE__ + return malloc_size(apData); #else static_assert(false, "Not implemented"); return 0; diff --git a/xmake.lua b/xmake.lua index 6567018..894a0bb 100644 --- a/xmake.lua +++ b/xmake.lua @@ -6,7 +6,7 @@ target("TiltedCore") set_kind("static") add_files("Code/core/src/*.cpp") add_includedirs("Code/core/include/", {public = true}) - add_headerfiles("Core/core/include/*.hpp", {prefixdir = "TiltedCore"}) + add_headerfiles("Code/core/include/*.hpp", {prefixdir = "TiltedCore"}) add_packages("mimalloc") target("Tests")