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)