Commit 49b2208dd53c9da6f1a29cfeaa90bd5bae2fb161

Authored by Stéphane Raimbault
1 parent 5d787302

Fix clang warnings about implicit declaration

src/modbus-rtu.c
@@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
20 #include <errno.h> 20 #include <errno.h>
21 #include <fcntl.h> 21 #include <fcntl.h>
22 #include <string.h> 22 #include <string.h>
  23 +#include <unistd.h>
23 24
24 #include "modbus.h" 25 #include "modbus.h"
25 #include "modbus-private.h" 26 #include "modbus-private.h"
@@ -250,6 +251,8 @@ ssize_t _modbus_rtu_recv(modbus_t *ctx, uint8_t *rsp, int rsp_length) @@ -250,6 +251,8 @@ ssize_t _modbus_rtu_recv(modbus_t *ctx, uint8_t *rsp, int rsp_length)
250 #endif 251 #endif
251 } 252 }
252 253
  254 +int _modbus_rtu_flush(modbus_t *);
  255 +
253 /* The check_crc16 function shall return the message length if the CRC is 256 /* The check_crc16 function shall return the message length if the CRC is
254 valid. Otherwise it shall return -1 and set errno to EMBADCRC. */ 257 valid. Otherwise it shall return -1 and set errno to EMBADCRC. */
255 int _modbus_rtu_check_integrity(modbus_t *ctx, uint8_t *msg, 258 int _modbus_rtu_check_integrity(modbus_t *ctx, uint8_t *msg,
src/modbus-tcp.c
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
22 #include <stdlib.h> 22 #include <stdlib.h>
23 #include <string.h> 23 #include <string.h>
24 #include <errno.h> 24 #include <errno.h>
  25 +#include <unistd.h>
25 26
26 #include <sys/types.h> 27 #include <sys/types.h>
27 #ifdef NATIVE_WIN32 28 #ifdef NATIVE_WIN32