Skip to content

Commit 7f25dd0

Browse files
committed
zephyr: Fix bug where prototype of SNPRINTF was not declared
Fix #10990. A warning is triggered when snprintf is used because it is being declared / configured incorrectly. The MBEDTLS configuration is defaulting to disabling all of LIBC, and then explicitly enabling the LIBC functions in use, this has been done for printf with MBEDTLS_PLATFORM_STD_PRINTF, but not for MBEDTLS_PLATFORM_STD_SNPRINTF. Signed-off-by: Sebastian Bøe <[email protected]>
1 parent 2a864dd commit 7f25dd0

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

boot/zephyr/include/config-kw.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#define MBEDTLS_NO_PLATFORM_ENTROPY
4444
#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
4545
#define MBEDTLS_PLATFORM_PRINTF_ALT
46+
#define MBEDTLS_PLATFORM_SNPRINTF_ALT
4647

4748
#define MBEDTLS_ASN1_PARSE_C
4849

boot/zephyr/include/config-rsa-kw.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#define MBEDTLS_NO_PLATFORM_ENTROPY
4444
#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
4545
#define MBEDTLS_PLATFORM_PRINTF_ALT
46+
#define MBEDTLS_PLATFORM_SNPRINTF_ALT
4647

4748
#if !defined(CONFIG_ARM)
4849
#define MBEDTLS_HAVE_ASM

boot/zephyr/include/config-rsa.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#define MBEDTLS_NO_PLATFORM_ENTROPY
4444
#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
4545
#define MBEDTLS_PLATFORM_PRINTF_ALT
46+
#define MBEDTLS_PLATFORM_SNPRINTF_ALT
4647

4748
#if !defined(CONFIG_ARM)
4849
#define MBEDTLS_HAVE_ASM

0 commit comments

Comments
 (0)