mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-06 15:51:25 +00:00
Fix FreeRTOS-Plus-TCP
This commit is contained in:
1 parent
0dfcf9607a
commit
8167291ffc
4 files changed
+34
-26
No files matched your search
+14
-11
@@ -23,17 +23,20 @@
|
||||
#define SO_ERROR 0
|
||||
#define SOL_SOCKET 0
|
||||
#define SO_REUSEADDR 0
|
||||
#undef EINTR
|
||||
#undef EWOULDBLOCK
|
||||
#undef EINPROGRESS
|
||||
#undef EPIPE
|
||||
#undef ECONNRESET
|
||||
#define EINTR pdFREERTOS_ERRNO_EINTR
|
||||
#define EWOULDBLOCK pdFREERTOS_ERRNO_EWOULDBLOCK
|
||||
#define EINPROGRESS pdFREERTOS_ERRNO_EINPROGRESS
|
||||
#define EPIPE 0
|
||||
#define ECONNRESET 0
|
||||
#define EINTR pdFREERTOS_ERRNO_EINTR
|
||||
|
||||
#define MG_SOCK_ERR(errcode) ((errcode) < 0 ? (errcode) : 0)
|
||||
|
||||
#define MG_SOCK_PENDING(errcode) \
|
||||
((errcode) == -pdFREERTOS_ERRNO_EWOULDBLOCK || \
|
||||
(errcode) == -pdFREERTOS_ERRNO_EISCONN || \
|
||||
(errcode) == -pdFREERTOS_ERRNO_EINPROGRESS || \
|
||||
(errcode) == -pdFREERTOS_ERRNO_EAGAIN)
|
||||
|
||||
#define MG_SOCK_RESET(errcode) ((errcode) == -pdFREERTOS_ERRNO_ENOTCONN)
|
||||
|
||||
// actually only if optional timeout is enabled
|
||||
#define MG_SOCK_INTR(fd) (fd == NULL)
|
||||
|
||||
#define sockaddr_in freertos_sockaddr
|
||||
#define sockaddr freertos_sockaddr
|
||||
#define accept(a, b, c) FreeRTOS_accept((a), (b), (c))
|
||||
|
||||
Reference in new issue
Block a user