diff --git a/src/io.c b/src/io.c index ffe8e2fdf..563cc8c25 100644 --- a/src/io.c +++ b/src/io.c @@ -142,6 +142,7 @@ void* wolfSSH_GetIOWriteCtx(WOLFSSH* ssh) #include #elif defined(WOLFSSH_ZEPHYR) #include + #include #else #include #include @@ -258,6 +259,15 @@ void* wolfSSH_GetIOWriteCtx(WOLFSSH* ssh) #elif defined(WOLFSSL_NUCLEUS) #define SEND_FUNCTION NU_Send #define RECV_FUNCTION NU_Recv +#elif defined(WOLFSSH_ZEPHYR) + #if KERNEL_VERSION_NUMBER >= 0x40100 + /* Zephyr 4.1 dropped the POSIX socket names; zsock_ is always there. */ + #define SEND_FUNCTION zsock_send + #define RECV_FUNCTION zsock_recv + #else + #define SEND_FUNCTION send + #define RECV_FUNCTION recv + #endif #else #define SEND_FUNCTION send #define RECV_FUNCTION recv