diff --git a/include/openthread/platform/toolchain.h b/include/openthread/platform/toolchain.h index 474221349..0741f175d 100644 --- a/include/openthread/platform/toolchain.h +++ b/include/openthread/platform/toolchain.h @@ -303,12 +303,14 @@ extern "C" { /* * Keil and IAR compiler doesn't provide type limits for C++. */ +#ifdef __cplusplus #if defined(__CC_ARM) || defined(__ICCARM__) #ifndef UINT32_MAX #define UINT32_MAX 0xffffffff #endif +#endif #endif /**