From: Willy Tarreau Date: Sun, 2 Nov 2025 13:21:28 +0000 (+0100) Subject: tools/nolibc: add the more portable inttypes.h X-Git-Tag: v6.19-rc1~194^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44bf8bbe29fd50ed2b8dfd1873bd22f76ca2f4d9;p=thirdparty%2Flinux.git tools/nolibc: add the more portable inttypes.h It's often recommended to only use inttypes.h instead of stdint.h for portability reasons since the former is always present when the latter is present, but not conversely, and the former includes the latter. Due to this some simple programs fail to build when including inttypes.h. Let's add one that simply includes nolibc.h to better support these programs. Signed-off-by: Willy Tarreau Signed-off-by: Thomas Weißschuh --- diff --git a/tools/include/nolibc/Makefile b/tools/include/nolibc/Makefile index 5a07e1d37adf3..6e31187c89aac 100644 --- a/tools/include/nolibc/Makefile +++ b/tools/include/nolibc/Makefile @@ -33,6 +33,7 @@ all_files := \ errno.h \ fcntl.h \ getopt.h \ + inttypes.h \ limits.h \ math.h \ nolibc.h \ diff --git a/tools/include/nolibc/inttypes.h b/tools/include/nolibc/inttypes.h new file mode 100644 index 0000000000000..1977bd74bfeb6 --- /dev/null +++ b/tools/include/nolibc/inttypes.h @@ -0,0 +1,3 @@ +/* SPDX-License-Identifier: LGPL-2.1 OR MIT */ + +#include "nolibc.h"