diff --git a/src/posix/platform/CMakeLists.txt b/src/posix/platform/CMakeLists.txt index 28a5527a8..0a44c88a2 100644 --- a/src/posix/platform/CMakeLists.txt +++ b/src/posix/platform/CMakeLists.txt @@ -135,6 +135,10 @@ target_link_libraries(openthread-posix PUBLIC openthread-platform PRIVATE + openthread-cli-ftd + openthread-ftd + openthread-hdlc + openthread-spinel-rcp openthread-url ot-config-ftd ot-config diff --git a/src/posix/platform/memory.cpp b/src/posix/platform/memory.cpp index 7294dd6f2..15d4a799c 100644 --- a/src/posix/platform/memory.cpp +++ b/src/posix/platform/memory.cpp @@ -34,7 +34,9 @@ #include #if OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE +extern "C" { void *otPlatCAlloc(size_t aNum, size_t aSize) { return calloc(aNum, aSize); } void otPlatFree(void *aPtr) { free(aPtr); } +} // extern "C" #endif