Re: [PATCH v2] fuse: uapi: use UAPI types
From: Bernd Schubert
Date: Fri Jan 02 2026 - 17:27:29 EST
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@xxxxxxxxxxxxx>
> ---
> 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@xxxxxxxxxxxxx
> ---
> 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.
Thanks,
Bernd