From 46606cb2d6089dc473025d681a45757343539c6b Mon Sep 17 00:00:00 2001 From: Ilya Maximets Date: Mon, 26 Sep 2022 23:18:48 +0200 Subject: sparse: Add a guard for netinet/ip6.h header on FreeBSD. Same as arpa/inet.h, the netinet/ip6.h on FreeBSD requires netinet/in.h to be included first. So, adding a similar guard. Also fixing one instance where this is not respected at the moment. We do have FreeBSD CI these days, but it is still nice to have a more clear error message. Fixes: b2befd5bb2db ("sparse: Add guards to prevent FreeBSD-incompatible #include order.") Acked-by: Mike Pattrick Signed-off-by: Ilya Maximets --- include/sparse/netinet/ip6.h | 4 ++++ lib/netdev-offload-dpdk.c | 1 + 2 files changed, 5 insertions(+) diff --git a/include/sparse/netinet/ip6.h b/include/sparse/netinet/ip6.h index bfa637a46..b2b6f47d9 100644 --- a/include/sparse/netinet/ip6.h +++ b/include/sparse/netinet/ip6.h @@ -18,6 +18,10 @@ #error "Use this header only with sparse. It is not a correct implementation." #endif +#ifndef NETINET_IN_H_INCLUDED +#error "Must include before for FreeBSD support" +#endif + #ifndef __NETINET_IP6_SPARSE #define __NETINET_IP6_SPARSE 1 diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c index cceefbc50..80a64a6cc 100644 --- a/lib/netdev-offload-dpdk.c +++ b/lib/netdev-offload-dpdk.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include -- cgit v1.2.1