Re: [PATCH] vfs: use UAPI types for new struct delegation definition

From: Arnd Bergmann

Date: Wed Dec 03 2025 - 09:14:52 EST


On Wed, Dec 3, 2025, at 14:57, 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.
>
> Fixes: 1602bad16d7d ("vfs: expose delegation support to userland")
> Fixes: 4be9e04ebf75 ("vfs: add needed headers for new struct delegation
> definition")
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>

Acked-by: Arnd Bergmann <arnd@xxxxxxxx>

> --- a/include/uapi/linux/fcntl.h
> +++ b/include/uapi/linux/fcntl.h
> @@ -4,11 +4,7 @@
>
> #include <asm/fcntl.h>
> #include <linux/openat2.h>
> -#ifdef __KERNEL__
> #include <linux/types.h>
> -#else
> -#include <stdint.h>
> -#endif

I think we have a couple more files that could use similar changes,
but they tend to be at a larger scale:

include/uapi/linux/fuse.h
include/uapi/linux/idxd.h
include/uapi/linux/ax25.h
include/uapi/regulator/regulator.h
include/uapi/xen/privcmd.h

Arnd