Skip to content

Commit 827c264

Browse files
HAVE_NETINET_IN_H as guard around header
Hi, it does not make sense to have this in a config.h, and then still include it when HAVE_NETINET_IN_H is 0. This fix solves this.
1 parent dde16d5 commit 827c264

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/modbus-tcp.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,12 @@
4040
# include <netinet/in_systm.h>
4141
#endif
4242

43-
# include <netinet/in.h>
44-
# include <netinet/ip.h>
43+
#ifdef HAVE_NETINET_IN_H
44+
#include <netinet/in.h>
45+
#endif /* HAVE_NETINET_IN_H */
46+
#ifdef HAVE_NETINET_IP_H
47+
#include <netinet/ip.h>
48+
#endif /* HAVE_NETINET_IP_H */
4549
# include <netinet/tcp.h>
4650
# include <arpa/inet.h>
4751
# include <netdb.h>

tests/bandwidth-server-many-up.c

+2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
#include <ws2tcpip.h>
1818
#else
1919
#include <arpa/inet.h>
20+
#ifdef HAVE_NETINET_IN_H
2021
#include <netinet/in.h>
22+
#endif /* HAVE_NETINET_IN_H */
2123
#include <sys/select.h>
2224
#include <sys/socket.h>
2325
#endif

0 commit comments

Comments
 (0)