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.
True, but I thought we would want to keep the 'bitwise' attribute that
comes with __sum16. On the other hand, I see it's only used by
sparse(1), not by gcc itself: