Commit 2e9da98ca529e3532fdbfd083e775441245cf342

Authored by Matthias Weisser
Committed by Stéphane Raimbault
1 parent 1d4241df

Make modbus.h more self contained

If <sys/time.h> is not included before "modbus.h" as struct timeval
is not declared. This behavior was observed while building libmodbus
for QNX.

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
Showing 2 changed files with 1 additions and 1 deletions
src/modbus.c
... ... @@ -38,7 +38,6 @@
38 38 #include <stdint.h>
39 39 #endif
40 40 #include <termios.h>
41   -#include <sys/time.h>
42 41 #include <unistd.h>
43 42 #include <errno.h>
44 43 #include <assert.h>
... ...
src/modbus.h
... ... @@ -37,6 +37,7 @@
37 37 #include <netinet/ip.h>
38 38 #include <netinet/tcp.h>
39 39 #include <arpa/inet.h>
  40 +#include <sys/time.h>
40 41  
41 42 #include "modbus-version.h"
42 43  
... ...