diff --git a/platform/ctr/source/runtime.cpp b/platform/ctr/source/runtime.cpp index 809b82e5e..62e7852ea 100644 --- a/platform/ctr/source/runtime.cpp +++ b/platform/ctr/source/runtime.cpp @@ -2,6 +2,8 @@ #include +#include + #define SOC_BUFSIZE 0x100000 #define BUFFER_ALIGN 0x1000 @@ -19,7 +21,7 @@ extern "C" R_ABORT_UNLESS(frdInit()); - SOCKET_BUFFER = (uint32_t*)memalign(BUFFER_ALIGN, SOC_BUFSIZE); + SOCKET_BUFFER = (uint32_t*)aligned_alloc(BUFFER_ALIGN, SOC_BUFSIZE); R_ABORT_LAMBDA_UNLESS(socInit(SOCKET_BUFFER, SOC_BUFSIZE), [&]() { free(SOCKET_BUFFER); }); R_ABORT_UNLESS(ptmuInit()); @@ -42,7 +44,7 @@ extern "C" mcuHwcExit(); socExit(); - free(SOCKET_BUFFER); + std::free(SOCKET_BUFFER); frdExit();