diff --git a/lib/system/freertos/alloc.h b/lib/system/freertos/alloc.h index 439e28903..c4d5b0d22 100644 --- a/lib/system/freertos/alloc.h +++ b/lib/system/freertos/alloc.h @@ -42,6 +42,9 @@ #include "FreeRTOS.h" +#ifdef __cplusplus +extern "C" { +#endif static inline void *metal_allocate_memory(unsigned int size) { diff --git a/lib/system/freertos/irq.h b/lib/system/freertos/irq.h index 178114868..7e0d915a4 100644 --- a/lib/system/freertos/irq.h +++ b/lib/system/freertos/irq.h @@ -40,6 +40,10 @@ #ifndef __METAL_FREERTOS_IRQ__H__ #define __METAL_FREERTOS_IRQ__H__ +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief default interrupt handler * @param[in] interrupt vector