Skip to content

Commit

Permalink
HAVE_NETINET_IN_H as guard around header (#765)
Browse files Browse the repository at this point in the history
  • Loading branch information
diplfranzhoepfinger authored Oct 21, 2024
1 parent 6a39116 commit ae6f327
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/modbus-tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@
# include <netinet/in_systm.h>
#endif

# include <netinet/in.h>
# include <netinet/ip.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif /* HAVE_NETINET_IN_H */
#ifdef HAVE_NETINET_IP_H
#include <netinet/ip.h>
#endif /* HAVE_NETINET_IP_H */
# include <netinet/tcp.h>
# include <arpa/inet.h>
# include <netdb.h>
Expand Down
2 changes: 2 additions & 0 deletions tests/bandwidth-server-many-up.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
#include <ws2tcpip.h>
#else
#include <arpa/inet.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif /* HAVE_NETINET_IN_H */
#include <sys/select.h>
#include <sys/socket.h>
#endif
Expand Down

0 comments on commit ae6f327

Please sign in to comment.