From ae6f327655280294afa99b1c975994efca06bdce Mon Sep 17 00:00:00 2001 From: diplfranzhoepfinger Date: Mon, 21 Oct 2024 19:18:15 +0200 Subject: [PATCH] HAVE_NETINET_IN_H as guard around header (#765) Thank you @diplfranzhoepfinger --- src/modbus-tcp.c | 8 ++++++-- tests/bandwidth-server-many-up.c | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modbus-tcp.c b/src/modbus-tcp.c index 60ac6b469..8e5e37cdc 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 f6eb7d7fb..544f03715 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