diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h index bf3029791..3b2ebf72e 100644 --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h @@ -2594,6 +2594,10 @@ extern void uITRON4_free(void *p) ; #endif /*(WOLFSSL_APACHE_MYNEWT)*/ #ifdef WOLFSSL_ZEPHYR + #ifdef __cplusplus + } /* extern "C" */ + #endif + #include #if KERNEL_VERSION_NUMBER >= 0x30100 #include @@ -2606,6 +2610,10 @@ extern void uITRON4_free(void *p) ; #endif #include + #ifdef __cplusplus + extern "C" { + #endif + #define WOLFSSL_DH_CONST #define NO_WRITEV #define NO_STDLIB_ISASCII diff --git a/wolfssl/wolfcrypt/wc_port.h b/wolfssl/wolfcrypt/wc_port.h index 875511d72..384edab03 100644 --- a/wolfssl/wolfcrypt/wc_port.h +++ b/wolfssl/wolfcrypt/wc_port.h @@ -283,8 +283,6 @@ #elif defined(WOLFSSL_APACHE_MYNEWT) /* do nothing */ #elif defined(WOLFSSL_ZEPHYR) - /* Zephyr SDK can use a cpp compiler which will cause - * problems with extern "C" linkage if not handled */ #ifdef __cplusplus } /* extern "C" */ #endif @@ -994,8 +992,16 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void); #define XFGETS(b,s,f) -2 /* Not ported yet */ #elif defined(WOLFSSL_ZEPHYR) + #ifdef __cplusplus + } /* extern "C" */ + #endif + #include + #ifdef __cplusplus + extern "C" { + #endif + #define XFILE struct fs_file_t* /* These are our wrappers for opening and closing files to @@ -1481,6 +1487,10 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void); #define USE_WOLF_TIME_T #elif defined(WOLFSSL_ZEPHYR) + #ifdef __cplusplus + } /* extern "C" */ + #endif + #include #ifndef _POSIX_C_SOURCE #if KERNEL_VERSION_NUMBER >= 0x30100 @@ -1500,6 +1510,10 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void); #endif #endif + #ifdef __cplusplus + extern "C" { + #endif + time_t z_time(time_t *timer); #define XTIME(tl) z_time((tl)) diff --git a/wolfssl/wolfio.h b/wolfssl/wolfio.h index 2ddd830ef..2afe9525b 100644 --- a/wolfssl/wolfio.h +++ b/wolfssl/wolfio.h @@ -176,6 +176,10 @@ #include #include #elif defined(WOLFSSL_ZEPHYR) + #ifdef __cplusplus + } /* extern "C" */ + #endif + #include #if KERNEL_VERSION_NUMBER >= 0x30100 #include @@ -188,6 +192,10 @@ #include #endif #endif + + #ifdef __cplusplus + extern "C" { + #endif #elif defined(MICROCHIP_PIC32) #include #elif defined(HAVE_NETX)