summaryrefslogtreecommitdiff
path: root/extmod/mbedtls/mbedtls_config_common.h
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2025-06-12 10:36:59 +1000
committerDamien George <damien@micropython.org>2025-07-23 15:47:17 +1000
commit28082d1d25c55a513677441c8053b82f6786aa3d (patch)
tree3ec0fd5570a5b782593f1ecae55b72908e149bcf /extmod/mbedtls/mbedtls_config_common.h
parent89f9ee9d7c08bb0912b94fe6190646c4d37508a2 (diff)
extmod/mbedtls: Undefine ARRAY_SIZE if defined by platform.
This is an annoying regression caused by including mpconfig.h in 36922df - the mimxrt platform headers define ARRAY_SIZE and mbedtls also defines in some source files, using a different parameter name which is a warning in gcc. Technically mimxrt SDK is to blame here, but as this isn't a named warning in gcc the only way to work around it in the mimxrt port would be to disable all warnings when building this particular mbedTLS source file. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'extmod/mbedtls/mbedtls_config_common.h')
-rw-r--r--extmod/mbedtls/mbedtls_config_common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/extmod/mbedtls/mbedtls_config_common.h b/extmod/mbedtls/mbedtls_config_common.h
index 1f7ac8818..040b0598d 100644
--- a/extmod/mbedtls/mbedtls_config_common.h
+++ b/extmod/mbedtls/mbedtls_config_common.h
@@ -123,4 +123,8 @@ void m_tracked_free(void *ptr);
#endif
+// Workaround for a mimxrt platform driver header that defines ARRAY_SIZE,
+// which is also defined in some mbedtls source files.
+#undef ARRAY_SIZE
+
#endif // MICROPY_INCLUDED_MBEDTLS_CONFIG_COMMON_H