[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260103141025.2651dbbd@pumpkin>
Date: Sat, 3 Jan 2026 14:10:25 +0000
From: David Laight <david.laight.linux@...il.com>
To: Bernd Schubert <bernd@...ernd.com>
Cc: Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
Miklos Szeredi <miklos@...redi.hu>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH v2] fuse: uapi: use UAPI types
On Fri, 2 Jan 2026 23:27:16 +0100
Bernd Schubert <bernd@...ernd.com> wrote:
> On 12/30/25 13:10, Thomas Weißschuh wrote:
> > Using libc types and headers from the UAPI headers is problematic as it
> > introduces a dependency on a full C toolchain.
> >
> > Use the fixed-width integer types provided by the UAPI headers instead.
> > To keep compatibility with non-Linux platforms, add a stdint.h fallback.
> >
> > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
> > ---
> > Changes in v2:
> > - Fix structure member alignments
> > - Keep compatibility with non-Linux platforms
> > - Link to v1: https://lore.kernel.org/r/20251222-uapi-fuse-v1-1-85a61b87baa0@linutronix.de
> > ---
> > include/uapi/linux/fuse.h | 626 +++++++++++++++++++++++-----------------------
> > 1 file changed, 319 insertions(+), 307 deletions(-)
>
> I tested this and it breaks libfuse compilation
>
> https://github.com/libfuse/libfuse/pull/1410
>
> Any chance you could test libfuse compilation for v3? Easiest way is to
> copy it to <libfuse>/include/fuse_kernel.h and then create PR. That
> includes a BSD test.
>
>
> libfuse3.so.3.19.0.p/fuse_uring.c.o -c
> ../../../home/runner/work/libfuse/libfuse/lib/fuse_uring.c
> ../../../home/runner/work/libfuse/libfuse/lib/fuse_uring.c:197:5: error:
> format specifies type 'unsigned long' but the argument has type '__u64'
> (aka 'unsigned long long') [-Werror,-Wformat]
> 196 | fuse_log(FUSE_LOG_DEBUG, " unique: %" PRIu64
> ", result=%d\n",
> | ~~~~~~~~~
> 197 | out->unique, ent_in_out->payload_sz);
> | ^~~~~~~~~~~
> 1 error generated.
>
>
> I can certainly work it around in libfuse by adding a cast, IMHO,
> PRIu64 is the right format.
Or use 'unsigned long long' for the 64bit values and %llu for the format.
I'm pretty sure that works for all reasonable modern architectures.
You might still want to use the fuse_[us][8|16|32|64] names but they
can be defined directly as char/short/int/long long.
David
>
>
> Thanks,
> Bernd
>
Powered by blists - more mailing lists