]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/nolibc: Fix build with host headers and libc
authorDavid Laight <david.laight.linux@gmail.com>
Mon, 23 Feb 2026 10:17:21 +0000 (10:17 +0000)
committerThomas Weißschuh <linux@weissschuh.net>
Fri, 20 Mar 2026 16:45:45 +0000 (17:45 +0100)
commit27532c645e61da541173d43fbe03d234f68232f9
tree2758d8284365eece794bc67415b1032e42209557
parent8ba600aa577f73cc551747fdf121afc7d04afcea
selftests/nolibc: Fix build with host headers and libc

Many systems don't have strlcpy() or strlcat() and readdir_r() is
deprecated. This makes the tests fail to build with the host headers.
Disable the 'directories' test and define strlcpy(), strlcat() and
readdir_r() using #defines so that the code compiles.

Fixes: 6fe8360b16acb ("selftests/nolibc: also test libc-test through regular selftest framework")
Signed-off-by: David Laight <david.laight.linux@gmail.com>
Link: https://patch.msgid.link/20260223101735.2922-4-david.laight.linux@gmail.com
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
tools/testing/selftests/nolibc/nolibc-test.c