Skip to content

Commit

Permalink
zephyr: Fix bug where prototype of SNPRINTF was not declared
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
SebastianBoe committed Mar 1, 2019
1 parent 2a864dd commit 7f25dd0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions boot/zephyr/include/config-kw.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#define MBEDTLS_NO_PLATFORM_ENTROPY
#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
#define MBEDTLS_PLATFORM_PRINTF_ALT
#define MBEDTLS_PLATFORM_SNPRINTF_ALT

#define MBEDTLS_ASN1_PARSE_C

Expand Down
1 change: 1 addition & 0 deletions boot/zephyr/include/config-rsa-kw.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#define MBEDTLS_NO_PLATFORM_ENTROPY
#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
#define MBEDTLS_PLATFORM_PRINTF_ALT
#define MBEDTLS_PLATFORM_SNPRINTF_ALT

#if !defined(CONFIG_ARM)
#define MBEDTLS_HAVE_ASM
Expand Down
1 change: 1 addition & 0 deletions boot/zephyr/include/config-rsa.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#define MBEDTLS_NO_PLATFORM_ENTROPY
#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
#define MBEDTLS_PLATFORM_PRINTF_ALT
#define MBEDTLS_PLATFORM_SNPRINTF_ALT

#if !defined(CONFIG_ARM)
#define MBEDTLS_HAVE_ASM
Expand Down

0 comments on commit 7f25dd0

Please sign in to comment.