mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-03 08:25:47 +03:00
Fix compilation with gcc
This commit is contained in:
1 parent
b2fe4a64de
commit
4d4f3ba54f
3 files changed
+7
-2
No files matched your search
+4
-1
@@ -38,7 +38,10 @@ typedef enum {
|
||||
COAP_PDU_BUF,
|
||||
COAP_RESOURCE,
|
||||
COAP_RESOURCEATTR,
|
||||
COAP_SESSION
|
||||
#ifdef HAVE_LIBTINYDTLS
|
||||
COAP_DTLS_SESSION,
|
||||
#endif
|
||||
COAP_SESSION,
|
||||
} coap_memory_tag_t;
|
||||
|
||||
#ifndef WITH_LWIP
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
#include "uri.h"
|
||||
|
||||
struct coap_session_t;
|
||||
|
||||
#ifdef WITH_LWIP
|
||||
#include <lwip/pbuf.h>
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -500,7 +500,7 @@ coap_network_read(coap_socket_t *sock, coap_packet_t *packet) {
|
||||
#ifdef _WIN32
|
||||
len = recv(sock->fd, (char *)packet->payload, COAP_RXBUFFER_SIZE, 0);
|
||||
#else
|
||||
len = recv(sock->fd, (*packet)->payload, coap_get_max_packetlength(*packet), 0);
|
||||
len = recv(sock->fd, packet->payload, COAP_RXBUFFER_SIZE, 0);
|
||||
#endif
|
||||
if (len < 0) {
|
||||
#ifdef _WIN32
|
||||
|
||||
Reference in new issue
Block a user