Fix compilation with gcc

This commit is contained in:
jcmichelou committed 2017-06-26 17:42:27 +02:00
1 parent b2fe4a64de
commit 4d4f3ba54f
3 files changed
+7 -2

No files matched your search

+4 -1
View File
@@ -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
+2
View File
@@ -17,6 +17,8 @@
#include "uri.h"
struct coap_session_t;
#ifdef WITH_LWIP
#include <lwip/pbuf.h>
#endif
+1 -1
View File
@@ -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