diff --git a/src/internal.c b/src/internal.c index f8d014b30d..8f5babacfb 100644 --- a/src/internal.c +++ b/src/internal.c @@ -92,12 +92,6 @@ * pair */ - -#ifdef EXTERNAL_OPTS_OPENVPN -#error EXTERNAL_OPTS_OPENVPN should not be defined\ - when building wolfSSL -#endif - #ifndef WOLFCRYPT_ONLY #include diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h index 40c76a19a7..9316a92a27 100644 --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h @@ -319,8 +319,10 @@ #endif #endif -#if defined(BUILDING_WOLFSSL) && defined(WOLFSSL_OPTIONS_H) - #error wolfssl/options.h included in build of library object. +#if (defined(BUILDING_WOLFSSL) && defined(WOLFSSL_USE_OPTIONS_H)) || \ + (defined(BUILDING_WOLFSSL) && defined(WOLFSSL_OPTIONS_H) && \ + !defined(EXTERNAL_OPTS_OPENVPN)) + #error wolfssl/options.h included in compiled wolfssl library object. #endif #ifdef WOLFSSL_USER_SETTINGS diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index 5fb14b88a3..e77ba2adb8 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -34,6 +34,10 @@ decouple library dependencies with standard string, memory and so on. #include #include + #ifdef EXTERNAL_OPTS_OPENVPN + #error EXTERNAL_OPTS_OPENVPN should not be defined in compiled files. + #endif + #ifdef __APPLE__ #include #endif