diff --git a/mjs.c b/mjs.c index 49c3d92..262707c 100644 --- a/mjs.c +++ b/mjs.c @@ -1145,7 +1145,9 @@ int gettimeofday(struct timeval *tp, void *tzp); /* * ARM C Compiler doesn't have strdup, so we provide it */ -#define CS_ENABLE_STRDUP defined(__ARMCC_VERSION) +#if defined(__ARMCC_VERSION) +#define CS_ENABLE_STRDUP 1 +#endif #endif /* CS_PLATFORM == CS_P_NRF51 */ #endif /* CS_COMMON_PLATFORMS_PLATFORM_NRF51_H_ */ @@ -1189,7 +1191,9 @@ int gettimeofday(struct timeval *tp, void *tzp); /* * ARM C Compiler doesn't have strdup, so we provide it */ -#define CS_ENABLE_STRDUP defined(__ARMCC_VERSION) +#if defined(__ARMCC_VERSION) +#define CS_ENABLE_STRDUP 1 +#endif #endif /* CS_PLATFORM == CS_P_NRF52 */ #endif /* CS_COMMON_PLATFORMS_PLATFORM_NRF52_H_ */ diff --git a/src/common/platforms/platform_nrf51.h b/src/common/platforms/platform_nrf51.h index 6f1357b..2f04c07 100644 --- a/src/common/platforms/platform_nrf51.h +++ b/src/common/platforms/platform_nrf51.h @@ -48,7 +48,9 @@ int gettimeofday(struct timeval *tp, void *tzp); /* * ARM C Compiler doesn't have strdup, so we provide it */ -#define CS_ENABLE_STRDUP defined(__ARMCC_VERSION) +#if defined(__ARMCC_VERSION) +#define CS_ENABLE_STRDUP 1 +#endif #endif /* CS_PLATFORM == CS_P_NRF51 */ #endif /* CS_COMMON_PLATFORMS_PLATFORM_NRF51_H_ */ diff --git a/src/common/platforms/platform_nrf52.h b/src/common/platforms/platform_nrf52.h index 2b8b882..0cd12bb 100644 --- a/src/common/platforms/platform_nrf52.h +++ b/src/common/platforms/platform_nrf52.h @@ -51,7 +51,9 @@ /* * ARM C Compiler doesn't have strdup, so we provide it */ -#define CS_ENABLE_STRDUP defined(__ARMCC_VERSION) +#if defined(__ARMCC_VERSION) +#define CS_ENABLE_STRDUP 1 +#endif #endif /* CS_PLATFORM == CS_P_NRF52 */ #endif /* CS_COMMON_PLATFORMS_PLATFORM_NRF52_H_ */