On Wed, Oct 30, 2024 at 09:50:10PM +0100, Stefano Brivio wrote: > ...so we need to include that header explicitly. For some reason, it > works without it when building against glibc. Presumably because glibc indirectly imports linux/types.h at some point. But, I think there's a better way to fix this. We use __sum16 because it's the type of the checksum field in the linux/tcp.h version of struct tcphdr. But we've recently changed to using the netinet/tcp.h version, which just uses a plain uint16_t. We should change to match, and this will go away. > > Reported-by: omni > Fixes: 3d484aa37090 ("tcp: Update TCP checksum using an iovec array") > Signed-off-by: Stefano Brivio > --- > tcp.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tcp.c b/tcp.c > index 4e0a17e..429634a 100644 > --- a/tcp.c > +++ b/tcp.c > @@ -287,6 +287,8 @@ > #include > #include > > +#include /* For __sum16 */ > + > #include "checksum.h" > #include "util.h" > #include "iov.h" -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson