]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
kbuild: uapi: provide stub includes for some libc headers
authorThomas Weißschuh <linux@weissschuh.net>
Fri, 27 Feb 2026 06:38:04 +0000 (07:38 +0100)
committerNicolas Schier <nsc@kernel.org>
Thu, 12 Mar 2026 11:48:08 +0000 (12:48 +0100)
commitaad94ba683adc6ff7ff4e29ae48184b42782dd97
tree97db67f9c476985321591d1f19a08cfa6e391c09
parent0ef1b7a66b604593c62a6375e4b6afa0a5f2e04a
kbuild: uapi: provide stub includes for some libc headers

Some UAPI headers incorrectly use libc headers. To compile-test these
UAPI headers, their respective libc dependencies need to be present.
Not all kernel toolchains provide these headers, reducing test coverage.

Introduce some stub headers which provide just enough symbols to test
all UAPI headers. Most headers are empty anyways, as their symbols are
only used in macros which are not actually evaluated.

As these headers are only ever used with newer kernel toolchains, they
can defer to compiler builtins in many cases.

As more UAPI headers are cleaned up to not require these stubs anymore,
they can be removed again.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Tested-by: Nicolas Schier <nsc@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260227-kbuild-uapi-libc-v1-6-c17de0d19776@weissschuh.net
Signed-off-by: Nicolas Schier <nsc@kernel.org>
13 files changed:
usr/dummy-include/endian.h [new file with mode: 0644]
usr/dummy-include/limits.h [new file with mode: 0644]
usr/dummy-include/netinet/if_ether.h [new file with mode: 0644]
usr/dummy-include/netinet/in.h [new file with mode: 0644]
usr/dummy-include/stddef.h [new file with mode: 0644]
usr/dummy-include/stdint.h [new file with mode: 0644]
usr/dummy-include/string.h [new file with mode: 0644]
usr/dummy-include/sys/ioctl.h [new file with mode: 0644]
usr/dummy-include/sys/socket.h [new file with mode: 0644]
usr/dummy-include/sys/time.h [new file with mode: 0644]
usr/dummy-include/sys/types.h [new file with mode: 0644]
usr/dummy-include/time.h [new file with mode: 0644]
usr/dummy-include/unistd.h [new file with mode: 0644]