Skip to content

Commit ae6f327

Browse files
HAVE_NETINET_IN_H as guard around header (#765)
Thank you @diplfranzhoepfinger
1 parent 6a39116 commit ae6f327

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
@@ -42,8 +42,12 @@
4242
# include <netinet/in_systm.h>
4343
#endif
4444

45-
# include <netinet/in.h>
46-
# include <netinet/ip.h>
45+
#ifdef HAVE_NETINET_IN_H
46+
#include <netinet/in.h>
47+
#endif /* HAVE_NETINET_IN_H */
48+
#ifdef HAVE_NETINET_IP_H
49+
#include <netinet/ip.h>
50+
#endif /* HAVE_NETINET_IP_H */
4751
# include <netinet/tcp.h>
4852
# include <arpa/inet.h>
4953
# 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)