From fcce09a4d31800131d5183a53a490d8badfb96cb Mon Sep 17 00:00:00 2001 From: Eric Blankenhorn Date: Mon, 9 Dec 2024 12:59:37 -0600 Subject: [PATCH] Fix from review --- mcapi/crypto.c | 3 +++ mcapi/mcapi_test.c | 5 ++++- wolfssl/wolfcrypt/settings.h | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/mcapi/crypto.c b/mcapi/crypto.c index aa5e430199..0a5dc85017 100644 --- a/mcapi/crypto.c +++ b/mcapi/crypto.c @@ -24,6 +24,9 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif +#ifndef WOLFSSL_USER_SETTINGS + #include +#endif #include #ifdef MICROCHIP_MPLAB_HARMONY diff --git a/mcapi/mcapi_test.c b/mcapi/mcapi_test.c index 16d929749b..d92640fbbd 100644 --- a/mcapi/mcapi_test.c +++ b/mcapi/mcapi_test.c @@ -27,9 +27,12 @@ #include #endif -/* mc api header */ +#ifndef WOLFSSL_USER_SETTINGS + #include +#endif #include +/* mc api header */ #include "crypto.h" /* sanity test against our default implementation, wolfssl headers */ diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h index 9c939da85c..40c76a19a7 100644 --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h @@ -319,6 +319,10 @@ #endif #endif +#if defined(BUILDING_WOLFSSL) && defined(WOLFSSL_OPTIONS_H) + #error wolfssl/options.h included in build of library object. +#endif + #ifdef WOLFSSL_USER_SETTINGS #include "user_settings.h" #elif defined(USE_HAL_DRIVER) && !defined(HAVE_CONFIG_H)