ifstat.c:323:44: error: initialization of ‘long long unsigned int *’ from incompatible pointer type ‘__u64 *’ {aka ‘long unsigned int *’} [-Wincompatible-pointer-types]
323 | unsigned long long *vals = n->val;
Several other warnings are produced when -Wformat= is set, for example:
ss.c:3244:34: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=]
3244 | out(" rcv_nxt:%llu", s->mptcpi_rcv_nxt);
| ~~~^ ~~~~~~~~~~~~~~~~~
| | |
| | __u64 {aka long unsigned int}
| long long unsigned int
| %lu
This happens because __u64 is defined as long unsigned on ppc64le. As
pointed out by Florian Weimar, we should use -D__SANE_USERSPACE_TYPES__
if we really want to use long long unsigned in iproute2.
This fix the build failure and all the warnings without any change on