Merge pull request #6801 from julek-wolfssl/zephyr-fixes
Misc zephyr fixes
This commit is contained in:
commit
8a57936d7e
@ -973,6 +973,7 @@ XFILE z_fs_open(const char* filename, const char* mode)
|
||||
|
||||
file = (XFILE)XMALLOC(sizeof(*file), NULL, DYNAMIC_TYPE_FILE);
|
||||
if (file != NULL) {
|
||||
fs_file_t_init(file);
|
||||
if (fs_open(file, filename, flags) != 0) {
|
||||
XFREE(file, NULL, DYNAMIC_TYPE_FILE);
|
||||
file = NULL;
|
||||
|
@ -253,7 +253,7 @@
|
||||
#elif defined(WOLFSSL_TIRTOS)
|
||||
#define WOLFSSL_SOCKET_INVALID ((SOCKET_T)-1)
|
||||
#else
|
||||
#define WOLFSSL_SOCKET_INVALID (SOCKET_T)(0)
|
||||
#define WOLFSSL_SOCKET_INVALID (SOCKET_T)(-1)
|
||||
#endif
|
||||
#endif /* WOLFSSL_SOCKET_INVALID */
|
||||
|
||||
|
@ -761,13 +761,6 @@ typedef struct w64wrapper {
|
||||
debugging is turned on */
|
||||
#ifndef USE_WINDOWS_API
|
||||
#ifndef XSNPRINTF
|
||||
#if defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM) && \
|
||||
(defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL) || \
|
||||
defined(WOLFSSL_CERT_EXT) || defined(HAVE_PKCS7))
|
||||
/* case where stdio is not included else where but is needed
|
||||
for snprintf */
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#if defined(WOLFSSL_ESPIDF) && \
|
||||
(!defined(NO_ASN_TIME) && defined(HAVE_PKCS7))
|
||||
#include<stdarg.h>
|
||||
@ -797,8 +790,10 @@ typedef struct w64wrapper {
|
||||
}
|
||||
#define XSNPRINTF _xsnprintf_
|
||||
#elif defined(WOLF_C89)
|
||||
#include <stdio.h>
|
||||
#define XSPRINTF sprintf
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#define XSNPRINTF snprintf
|
||||
#endif
|
||||
#endif
|
||||
|
@ -113,9 +113,12 @@ if(CONFIG_WOLFSSL)
|
||||
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/port/st/stm32.c)
|
||||
|
||||
zephyr_library_link_libraries(wolfSSL)
|
||||
|
||||
add_definitions(-DWOLFSSL_USER_SETTINGS)
|
||||
add_definitions(-DWOLFSSL_ZEPHYR)
|
||||
|
||||
target_compile_definitions(wolfSSL INTERFACE WOLFSSL_ZEPHYR)
|
||||
target_compile_definitions(wolfSSL INTERFACE WOLFSSL_USER_SETTINGS)
|
||||
if(CONFIG_WOLFSSL_DEBUG)
|
||||
target_compile_definitions(wolfSSL INTERFACE DEBUG_WOLFSSL)
|
||||
endif()
|
||||
else()
|
||||
assert(CONFIG_WOLFSSL_LIBRARY "wolfSSL was enabled, but neither BUILTIN or LIBRARY was selected.")
|
||||
|
||||
|
@ -23,9 +23,6 @@ CONFIG_NET_SOCKETS_POSIX_NAMES=y
|
||||
|
||||
CONFIG_NET_TEST=y
|
||||
CONFIG_NET_LOOPBACK=y
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
CONFIG_DNS_SERVER_IP_ADDRESSES=y
|
||||
CONFIG_DNS_SERVER1="192.0.2.2"
|
||||
|
||||
# Network driver config
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
|
@ -28,9 +28,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef WOLFSSL_ZEPHYR
|
||||
#define WOLFSSL_ZEPHYR
|
||||
|
||||
#if 0
|
||||
#undef SINGLE_THREADED
|
||||
#define SINGLE_THREADED
|
||||
@ -147,11 +144,6 @@ extern "C" {
|
||||
#define WOLFSSL_HAVE_SP_ECC
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_WOLFSSL_DEBUG)
|
||||
#undef DEBUG_WOLFSSL
|
||||
#define DEBUG_WOLFSSL
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -33,9 +33,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef WOLFSSL_ZEPHYR
|
||||
#define WOLFSSL_ZEPHYR
|
||||
|
||||
#if 0
|
||||
#undef SINGLE_THREADED
|
||||
#define SINGLE_THREADED
|
||||
@ -140,11 +137,6 @@ extern "C" {
|
||||
#define WOLFSSL_HAVE_SP_ECC
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_WOLFSSL_DEBUG)
|
||||
#undef DEBUG_WOLFSSL
|
||||
#define DEBUG_WOLFSSL
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user