On 9/20/22 12:01, Finn, Emma wrote: >> -----Original Message----- >> From: Ilya Maximets <[email protected]> >> Sent: Monday 19 September 2022 12:50 >> To: [email protected] >> Cc: Finn, Emma <[email protected]>; Ilya Maximets <[email protected]> >> Subject: [PATCH] sparse: Add a guard for netinet/ip6.h header on FreeBSD. >> >> Same as netinet/in.h, the netinet/ip6.h on FreeBSD requires sys/types.h to be >> included first. So, adding a similar guard. >> >> 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.") >> Signed-off-by: Ilya Maximets <[email protected]> >> --- >> include/sparse/netinet/ip6.h | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/include/sparse/netinet/ip6.h b/include/sparse/netinet/ip6.h >> index >> bfa637a46..3beef3705 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 SYS_TYPES_H_INCLUDED >> +#error "Must include <sys/types.h> before <netinet/ip6.h> for FreeBSD >> support" >> +#endif >> + >> #ifndef __NETINET_IP6_SPARSE >> #define __NETINET_IP6_SPARSE 1 >> >> -- >> 2.37.3 > > The change looks good to me. > > Acked-by: Emma Finn <[email protected]> > >
Hmm. It looks like we actually need netinet/in.h here instead for ip6 structures. netinet/in.h by itself requires sys/types.h, so that will cover basic types. I'll send an updated patch. Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
