From a9c321cef594438a4f8c03c0aae9665f6cc4c6d1 Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Wed, 1 Jun 2016 11:44:12 +0100 Subject: [PATCH] Add MBEDTLS_FS_IO guard on default NV seed defines in platform.h The default implementation won't work without MBEDTLS_FS_IO, so leave undefined otherwise. --- include/mbedtls/platform.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/mbedtls/platform.h b/include/mbedtls/platform.h index 10137d781..5fa01b5b3 100644 --- a/include/mbedtls/platform.h +++ b/include/mbedtls/platform.h @@ -76,6 +76,7 @@ extern "C" { #if !defined(MBEDTLS_PLATFORM_STD_EXIT_FAILURE) #define MBEDTLS_PLATFORM_STD_EXIT_FAILURE EXIT_FAILURE /**< Default exit value to use */ #endif +#if defined(MBEDTLS_FS_IO) #if !defined(MBEDTLS_PLATFORM_STD_NV_SEED_READ) #define MBEDTLS_PLATFORM_STD_NV_SEED_READ mbedtls_platform_std_nv_seed_read #endif @@ -85,6 +86,7 @@ extern "C" { #if !defined(MBEDTLS_PLATFORM_STD_NV_SEED_FILE) #define MBEDTLS_PLATFORM_STD_NV_SEED_FILE "seedfile" #endif +#endif /* MBEDTLS_FS_IO */ #else /* MBEDTLS_PLATFORM_NO_STD_FUNCTIONS */ #if defined(MBEDTLS_PLATFORM_STD_MEM_HDR) #include MBEDTLS_PLATFORM_STD_MEM_HDR