Skip to content

Commit fe12169

Browse files
committed
Make presence of netinet/ip.h optional
Some environments, for example lwip, don't have it, so let's make it configurable so we can also build and work on those platforms by simplying using project configuration.
1 parent 5c14f13 commit fe12169

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ AC_CHECK_HEADERS([ \
8585
linux/serial.h \
8686
netdb.h \
8787
netinet/in.h \
88+
netinet/ip.h \
8889
netinet/tcp.h \
8990
sys/ioctl.h \
9091
sys/params.h \

src/modbus-tcp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
#endif
4242

4343
# include <netinet/in.h>
44+
#ifdef HAVE_NETINET_IP_H
4445
# include <netinet/ip.h>
46+
#endif
4547
# include <netinet/tcp.h>
4648
# include <arpa/inet.h>
4749
# include <netdb.h>

0 commit comments

Comments
 (0)