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 <sebastian.boe@nordicsemi.no>
  • Loading branch information
SebastianBoe authored and utzig committed Mar 4, 2019
1 parent c2216cc commit 048168a
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 @@ -46,6 +46,7 @@

#define MBEDTLS_PLATFORM_EXIT_ALT
#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 @@ -46,6 +46,7 @@

#define MBEDTLS_PLATFORM_EXIT_ALT
#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 @@ -46,6 +46,7 @@

#define MBEDTLS_PLATFORM_EXIT_ALT
#define MBEDTLS_PLATFORM_PRINTF_ALT
#define MBEDTLS_PLATFORM_SNPRINTF_ALT

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

0 comments on commit 048168a

Please sign in to comment.