diff --git a/src/core/utils/static_assert.hpp b/src/core/utils/static_assert.hpp index 6ed9fbff3..de25c704a 100644 --- a/src/core/utils/static_assert.hpp +++ b/src/core/utils/static_assert.hpp @@ -36,6 +36,13 @@ #ifdef __cplusplus +/** + * Some compilers such as Keil MDK-ARM does not support __COUNTER__ macro. + */ +#ifndef __COUNTER__ +#define __COUNTER__ __LINE__ +#endif + namespace ot { template struct StaticAssertError;