mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-01 14:02:40 +07:00
@@ -10,7 +10,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
revno: ["--mr v3.7-branch", "--mr v4.2.0"] # LTS, latest stable
|
||||
revno: ["--mr v3.7-branch", "--mr v4.2.0", "--mr v4.3.0"] # LTS, latest stable
|
||||
name: Zephyr ${{ matrix.revno }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -21460,6 +21460,15 @@ bool mg_random(void *buf, size_t len) {
|
||||
#elif MG_ARCH == MG_ARCH_PICOSDK
|
||||
while (len--) *p++ = (unsigned char) (get_rand_32() & 255);
|
||||
success = true;
|
||||
#elif MG_ARCH == MG_ARCH_ZEPHYR
|
||||
#if MG_TLS == MG_TLS_BUILTIN || \
|
||||
(MG_TLS == MG_TLS_MBED && (!defined(MBEDTLS_VERSION_NUMBER) || \
|
||||
MBEDTLS_VERSION_NUMBER < 0x04000000))
|
||||
return (sys_csrand_get(buf, len) == 0); // do not fallback on reseed error
|
||||
#else
|
||||
sys_rand_get(buf, len);
|
||||
success = true;
|
||||
#endif
|
||||
#elif MG_ARCH == MG_ARCH_WIN32
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1700
|
||||
static bool initialised = false;
|
||||
|
||||
+6
-3
@@ -723,12 +723,15 @@ typedef int socklen_t;
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/version.h>
|
||||
#include <zephyr/net/socket.h>
|
||||
//#include <zephyr/posix/dirent.h>
|
||||
#include <zephyr/posix/fcntl.h>
|
||||
#include <zephyr/posix/sys/select.h>
|
||||
#include <zephyr/random/random.h>
|
||||
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <zephyr/net/socket.h>
|
||||
#include <zephyr/posix/fcntl.h>
|
||||
#include <zephyr/posix/sys/select.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
+6
-3
@@ -4,12 +4,15 @@
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/version.h>
|
||||
#include <zephyr/net/socket.h>
|
||||
//#include <zephyr/posix/dirent.h>
|
||||
#include <zephyr/posix/fcntl.h>
|
||||
#include <zephyr/posix/sys/select.h>
|
||||
#include <zephyr/random/random.h>
|
||||
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <zephyr/net/socket.h>
|
||||
#include <zephyr/posix/fcntl.h>
|
||||
#include <zephyr/posix/sys/select.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -27,6 +27,15 @@ bool mg_random(void *buf, size_t len) {
|
||||
#elif MG_ARCH == MG_ARCH_PICOSDK
|
||||
while (len--) *p++ = (unsigned char) (get_rand_32() & 255);
|
||||
success = true;
|
||||
#elif MG_ARCH == MG_ARCH_ZEPHYR
|
||||
#if MG_TLS == MG_TLS_BUILTIN || \
|
||||
(MG_TLS == MG_TLS_MBED && (!defined(MBEDTLS_VERSION_NUMBER) || \
|
||||
MBEDTLS_VERSION_NUMBER < 0x04000000))
|
||||
return (sys_csrand_get(buf, len) == 0); // do not fallback on reseed error
|
||||
#else
|
||||
sys_rand_get(buf, len);
|
||||
success = true;
|
||||
#endif
|
||||
#elif MG_ARCH == MG_ARCH_WIN32
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1700
|
||||
static bool initialised = false;
|
||||
|
||||
Reference in New Issue
Block a user