Re: [PATCH] tools/nolibc: Add stdbool.h to nolibc includes
From: Mark Brown
Date: Thu Sep 25 2025 - 10:27:36 EST
On Thu, Sep 25, 2025 at 11:14:23AM -0300, André Almeida wrote:
> Add stdbool.h to the list of nolibc.h includes, otherwise tests compiled
> with -nostdlib will fail with "error: unknown type name 'bool'", even if
> a nolibc stdbool implementation is available at tools/include/nolibc/.
>
> Reported-by: Mark Brown <broonie@xxxxxxxxxx>
> Closes: https://lore.kernel.org/lkml/833f5ae5-190e-47ec-9ad9-127ad166c80c@xxxxxxxxxxxxx/
> Signed-off-by: André Almeida <andrealmeid@xxxxxxxxxx>
Fixes: f2662ec26b26 ("selftests: kselftest: Create ksft_print_dbg_msg()")
> ---
> tools/include/nolibc/nolibc.h | 1 +
> 1 file changed, 1 insertion(+)
> --- a/tools/include/nolibc/nolibc.h
> +++ b/tools/include/nolibc/nolibc.h
> @@ -116,6 +116,7 @@
> #include "sched.h"
> #include "signal.h"
> #include "unistd.h"
> +#include "stdbool.h"
> #include "stdio.h"
> #include "stdlib.h"
> #include "string.h"
It's not 100% clear to me that we should add this to the nolibc
includes given that nolibc itself does not rely on or offer stdbool -
I was going to send something out adjusting kselftest.h to unguard the
include there.
Attachment:
signature.asc
Description: PGP signature