mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-28 00:52:23 +01:00
Merge pull request #9524 from julek-wolfssl/zephyr-cpp
Updates for latest zephyr with cpp
This commit is contained in:
@@ -2605,7 +2605,6 @@ extern void uITRON4_free(void *p) ;
|
||||
#include <stdlib.h>
|
||||
|
||||
#define WOLFSSL_DH_CONST
|
||||
#define WOLFSSL_HAVE_MAX
|
||||
#define NO_WRITEV
|
||||
#define NO_STDLIB_ISASCII
|
||||
|
||||
@@ -2616,7 +2615,6 @@ extern void uITRON4_free(void *p) ;
|
||||
|
||||
void *z_realloc(void *ptr, size_t size);
|
||||
#define realloc z_realloc
|
||||
#define max MAX
|
||||
|
||||
#if !defined(CONFIG_NET_SOCKETS_POSIX_NAMES) && !defined(CONFIG_POSIX_API)
|
||||
#define CONFIG_NET_SOCKETS_POSIX_NAMES
|
||||
|
||||
@@ -283,24 +283,30 @@
|
||||
#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
|
||||
|
||||
#include <version.h>
|
||||
#ifndef SINGLE_THREADED
|
||||
#if !defined(CONFIG_PTHREAD_IPC) && !defined(CONFIG_POSIX_THREADS)
|
||||
#error "Threading needs CONFIG_PTHREAD_IPC / CONFIG_POSIX_THREADS"
|
||||
#endif
|
||||
#ifdef max
|
||||
#undef max
|
||||
#if KERNEL_VERSION_NUMBER >= 0x30100
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/posix/posix_types.h>
|
||||
#include <zephyr/posix/pthread.h>
|
||||
#else
|
||||
#include <kernel.h>
|
||||
#include <posix/posix_types.h>
|
||||
#include <posix/pthread.h>
|
||||
#endif
|
||||
#endif
|
||||
#if KERNEL_VERSION_NUMBER >= 0x30100
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/posix/posix_types.h>
|
||||
#include <zephyr/posix/pthread.h>
|
||||
#else
|
||||
#include <kernel.h>
|
||||
#include <posix/posix_types.h>
|
||||
#include <posix/pthread.h>
|
||||
#endif
|
||||
#define max MAX
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#elif defined(WOLFSSL_TELIT_M2MB)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user