2.28 only: build broken when check_config.h
is not included
#9152
Labels
bug
component-platform
Portability layer and build scripts
priority-high
High priority - will be reviewed soon
size-xs
Estimated task size: extra small (a few hours at most)
In Mbed TLS 2.x, including
mbedtls/check_config.h
is optional. We do it in the default configuration file, but users can provide their own configuration file that doesn't include it.The general philosophy of
check_config.h
is to have no side effects, but that's not completely true:#if defined(_WIN32)
), it might defineMBEDTLS_PLATFORM_SNPRINTF_ALT
andMBEDTLS_PLATFORM_VSNPRINTF_ALT
.limits.h
.We need to ensure that these side effects don't matter. They do as of Mbed TLS 2.28.7: at least
oid.c
usesUINT_MAX
but does not includelimits.h
, which breaks the build whencheck_config.h
is not included. See openthread/openthread#10263 (comment)This is not an issue in Mbed TLS ≥3.0 because there
check_config.h
has no side effects: the side effects happen inbuild_info.h
.Almost all of our CI builds (if not all?) include
check_config.h
. So we might not notice if a build breaks whencheck_config.h
is not included. The goal of this issue is to:check_config.h
omitted inall.sh
.oid.c
and any other problem.The text was updated successfully, but these errors were encountered: