forked from wolfSSL/wolfssl
cyassl_io warning changes, submitted by Kevin Baca
This commit is contained in:
@@ -53,8 +53,12 @@
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
#if __PPU
|
||||||
|
#include <netex/errno.h>
|
||||||
|
#else
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#ifdef THREADX
|
#ifdef THREADX
|
||||||
#include <socket.h>
|
#include <socket.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -75,6 +79,12 @@
|
|||||||
#define SOCKET_ECONNRESET WSAECONNRESET
|
#define SOCKET_ECONNRESET WSAECONNRESET
|
||||||
#define SOCKET_EINTR WSAEINTR
|
#define SOCKET_EINTR WSAEINTR
|
||||||
#define SOCKET_EPIPE WSAEPIPE
|
#define SOCKET_EPIPE WSAEPIPE
|
||||||
|
#elif __PPU
|
||||||
|
#define SOCKET_EWOULDBLOCK SYS_NET_EWOULDBLOCK
|
||||||
|
#define SOCKET_EAGAIN SYS_NET_EAGAIN
|
||||||
|
#define SOCKET_ECONNRESET SYS_NET_ECONNRESET
|
||||||
|
#define SOCKET_EINTR SYS_NET_EINTR
|
||||||
|
#define SOCKET_EPIPE SYS_NET_EPIPE
|
||||||
#else
|
#else
|
||||||
#define SOCKET_EWOULDBLOCK EWOULDBLOCK
|
#define SOCKET_EWOULDBLOCK EWOULDBLOCK
|
||||||
#define SOCKET_EAGAIN EAGAIN
|
#define SOCKET_EAGAIN EAGAIN
|
||||||
@@ -116,7 +126,7 @@ int EmbedReceive(char *buf, int sz, void *ctx)
|
|||||||
|
|
||||||
recvd = RECV_FUNCTION(sd, (char *)buf, sz, 0);
|
recvd = RECV_FUNCTION(sd, (char *)buf, sz, 0);
|
||||||
|
|
||||||
if (recvd == -1) {
|
if (recvd < 0) {
|
||||||
err = LastError();
|
err = LastError();
|
||||||
CYASSL_MSG("Embed Receive error");
|
CYASSL_MSG("Embed Receive error");
|
||||||
|
|
||||||
@@ -157,7 +167,7 @@ int EmbedSend(char *buf, int sz, void *ctx)
|
|||||||
|
|
||||||
sent = SEND_FUNCTION(sd, &buf[sz - len], len, 0);
|
sent = SEND_FUNCTION(sd, &buf[sz - len], len, 0);
|
||||||
|
|
||||||
if (sent == -1) {
|
if (sent < 0) {
|
||||||
err = LastError();
|
err = LastError();
|
||||||
CYASSL_MSG("Embed Send error");
|
CYASSL_MSG("Embed Send error");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user