From: David Ahern <dsahern@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Andrea Claudi <aclaudi@redhat.com>,
netdev@vger.kernel.org, sgallagh@redhat.com
Subject: Re: [PATCH] iproute2: fix build failure on ppc64le
Date: Wed, 14 Feb 2024 20:10:54 -0700 [thread overview]
Message-ID: <f04a4b8e-9db0-458b-926a-fdd448becbb7@gmail.com> (raw)
In-Reply-To: <20240214190519.1233eef6@hermes.local>
On 2/14/24 8:05 PM, Stephen Hemminger wrote:
>
> I just did this:
>
> diff --git a/misc/ss.c b/misc/ss.c
> index 5296cabe9982..679d50b8fef6 100644
> --- a/misc/ss.c
> +++ b/misc/ss.c
> @@ -8,6 +8,7 @@
> #include <stdio.h>
> #include <stdlib.h>
> #include <unistd.h>
> +#include <inttypes.h>
> #include <fcntl.h>
> #include <sys/ioctl.h>
> #include <sys/socket.h>
> @@ -3241,7 +3242,7 @@ static void mptcp_stats_print(struct mptcp_info *s)
> if (s->mptcpi_snd_una)
> out(" snd_una:%llu", s->mptcpi_snd_una);
> if (s->mptcpi_rcv_nxt)
> - out(" rcv_nxt:%llu", s->mptcpi_rcv_nxt);
> + out(" rcv_nxt:%" PRIu64, s->mptcpi_rcv_nxt);
> if (s->mptcpi_local_addr_used)
> out(" local_addr_used:%u", s->mptcpi_local_addr_used);
> if (s->mptcpi_local_addr_max)
>
>
> And got this:
> CC ss.o
> ss.c: In function ‘mptcp_stats_print’:
> ss.c:3245:21: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘__u64’ {aka ‘long long unsigned int’} [-Wformat=]
> 3245 | out(" rcv_nxt:%" PRIu64, s->mptcpi_rcv_nxt);
> | ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
> | |
> | __u64 {aka long long unsigned int}
> In file included from ss.c:11:
> /usr/include/inttypes.h:105:41: note: format string is defined here
> 105 | # define PRIu64 __PRI64_PREFIX "u"
>
Andrea: can you check on how perf (kernel utils) compiles on ppc64le? I
thought Arnaldo had build "farms" for all of the architectures; maybe
not for this one. __u64 is used a lot in the perf_events UAPI and PRIu64
is used extensively in the userspace code.
next prev parent reply other threads:[~2024-02-15 3:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-09 10:24 [PATCH] iproute2: fix build failure on ppc64le Andrea Claudi
2024-02-09 12:02 ` Andrea Claudi
2024-02-09 16:35 ` Stephen Hemminger
2024-02-09 22:14 ` David Ahern
2024-02-10 0:45 ` Stephen Hemminger
2024-02-14 15:30 ` Andrea Claudi
2024-02-14 15:49 ` David Ahern
2024-02-15 3:05 ` Stephen Hemminger
2024-02-15 3:10 ` David Ahern [this message]
2024-02-16 9:57 ` Andrea Claudi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f04a4b8e-9db0-458b-926a-fdd448becbb7@gmail.com \
--to=dsahern@gmail.com \
--cc=aclaudi@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=sgallagh@redhat.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).