netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: David Ahern <dsahern@gmail.com>
Cc: Andrea Claudi <aclaudi@redhat.com>,
	netdev@vger.kernel.org, sgallagh@redhat.com
Subject: Re: [PATCH] iproute2: fix build failure on ppc64le
Date: Fri, 9 Feb 2024 16:45:42 -0800	[thread overview]
Message-ID: <20240209164542.716b4d7a@hermes.local> (raw)
In-Reply-To: <3730d7e4-058f-421f-8ecf-a9475440ef58@gmail.com>

On Fri, 9 Feb 2024 15:14:28 -0700
David Ahern <dsahern@gmail.com> wrote:

> On 2/9/24 9:35 AM, Stephen Hemminger wrote:
> > On Fri,  9 Feb 2024 11:24:47 +0100
> > Andrea Claudi <aclaudi@redhat.com> wrote:
> >   
> >> 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.  
> > 
> > Ok, this looks good.
> > Another way to fix would be to use the macros defined in inttypes.h
> > 
> > 		out(" rcv_nxt:"PRIu64, s->mptcpi_rcv_nxt);
> >   
> 
> since the uapi is __u64, I think this is the better approach.

NVM
Tried it, but __u64 is not the same as uint64_t even on x86.
__u64 is long long unsigned int
uint64_t is long unsigned int


  reply	other threads:[~2024-02-10  0:45 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 [this message]
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
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=20240209164542.716b4d7a@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=aclaudi@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sgallagh@redhat.com \
    /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).