Hi stable team,
On 2025-06-19 22:26:18-0400, Sasha Levin wrote:
This is a note to let you know that I've just added the patch titled
tools/nolibc: use intmax definitions from compiler
to the 6.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git%3Ba=su...
The filename of the patch is: tools-nolibc-use-intmax-definitions-from-compiler.patch and it can be found in the queue-6.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let stable@vger.kernel.org know about it.
As discussed in [0] and its ancestors, please only backport nolibc patches are were explicitly tagged for stable@.
[0] https://lore.kernel.org/lkml/2025061907-finance-dodgy-b0ae@gregkh/
Thanks, Thomas
commit fb60b190f25c7958f85fdae9b7024548139de281 Author: Thomas Weißschuh thomas.weissschuh@linutronix.de Date: Fri Apr 11 11:00:39 2025 +0200
tools/nolibc: use intmax definitions from compiler
[ Upstream commit e5407c0820ea5fa7117b85ed32b724af73156d63 ] The printf format checking in the compiler uses the intmax types from the compiler, not libc. This can lead to compiler errors. Instead use the types already provided by the compiler. Example issue with clang 19 for arm64: nolibc-test.c:30:2: error: format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uintmax_t' (aka 'unsigned long long') [-Werror,-Wformat] Signed-off-by: Thomas Weißschuh thomas.weissschuh@linutronix.de Acked-by: Willy Tarreau w@1wt.eu Signed-off-by: Sasha Levin sashal@kernel.org
diff --git a/tools/include/nolibc/stdint.h b/tools/include/nolibc/stdint.h index cd79ddd6170e0..b052ad6303c38 100644 --- a/tools/include/nolibc/stdint.h +++ b/tools/include/nolibc/stdint.h @@ -39,8 +39,8 @@ typedef size_t uint_fast32_t; typedef int64_t int_fast64_t; typedef uint64_t uint_fast64_t; -typedef int64_t intmax_t; -typedef uint64_t uintmax_t; +typedef __INTMAX_TYPE__ intmax_t; +typedef __UINTMAX_TYPE__ uintmax_t; /* limits of integral types */