diff --git a/src/modbus-tcp.c b/src/modbus-tcp.c index 60ac6b46..8e5e37cd 100644 --- a/src/modbus-tcp.c +++ b/src/modbus-tcp.c @@ -42,8 +42,12 @@ # include #endif -# include -# include +#ifdef HAVE_NETINET_IN_H +#include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_NETINET_IP_H +#include +#endif /* HAVE_NETINET_IP_H */ # include # include # include diff --git a/tests/bandwidth-server-many-up.c b/tests/bandwidth-server-many-up.c index f6eb7d7f..544f0371 100644 --- a/tests/bandwidth-server-many-up.c +++ b/tests/bandwidth-server-many-up.c @@ -17,7 +17,9 @@ #include #else #include +#ifdef HAVE_NETINET_IN_H #include +#endif /* HAVE_NETINET_IN_H */ #include #include #endif