From 0b3feea13c6ae7f620a7d9db49d2042f8291e7ca Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Fri, 28 Apr 2023 10:47:24 +0200 Subject: [PATCH 1/3] zephyr wolfssl_tls_sock: fix project name --- zephyr/samples/wolfssl_tls_sock/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zephyr/samples/wolfssl_tls_sock/CMakeLists.txt b/zephyr/samples/wolfssl_tls_sock/CMakeLists.txt index 512a0006fc..a1208f5029 100644 --- a/zephyr/samples/wolfssl_tls_sock/CMakeLists.txt +++ b/zephyr/samples/wolfssl_tls_sock/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.13.1) include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) -project(wolfssl_tls_threaded) +project(wolfssl_tls_sock) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) From 203ce416d279fdd2f86fc9c9fdcf889da607e708 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Fri, 28 Apr 2023 10:47:56 +0200 Subject: [PATCH 2/3] zephyr tls_sock.c: don't include options.h when using user settings --- zephyr/samples/wolfssl_tls_sock/src/tls_sock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zephyr/samples/wolfssl_tls_sock/src/tls_sock.c b/zephyr/samples/wolfssl_tls_sock/src/tls_sock.c index 489591ec8c..8e71527db7 100644 --- a/zephyr/samples/wolfssl_tls_sock/src/tls_sock.c +++ b/zephyr/samples/wolfssl_tls_sock/src/tls_sock.c @@ -19,7 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ -#include +#ifndef WOLFSSL_USER_SETTINGS + #include +#endif #include #define USE_CERT_BUFFERS_2048 #include From d5eec75bd60c9f9e40613880ff85b925f213a340 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Fri, 28 Apr 2023 10:48:25 +0200 Subject: [PATCH 3/3] zephyr: define XSTAT_TYPE for use with XSTAT --- wolfssl/wolfcrypt/wc_port.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfssl/wolfcrypt/wc_port.h b/wolfssl/wolfcrypt/wc_port.h index 83d1d86157..98606204b5 100644 --- a/wolfssl/wolfcrypt/wc_port.h +++ b/wolfssl/wolfcrypt/wc_port.h @@ -516,7 +516,6 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void); #include #define XFILE struct fs_file_t* - #define STAT struct fs_dirent /* These are our wrappers for opening and closing files to * make the API more POSIX like. */ @@ -537,6 +536,7 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void); #define XFGETS(b,s,f) -2 /* Not ported yet */ #define XSTAT fs_stat + #define XSTAT_TYPE struct fs_dirent #define XS_ISREG(s) (s == FS_DIR_ENTRY_FILE) #define SEPARATOR_CHAR ':'