From 44bf8bbe29fd50ed2b8dfd1873bd22f76ca2f4d9 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 2 Nov 2025 14:21:28 +0100 Subject: [PATCH] tools/nolibc: add the more portable inttypes.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- tools/include/nolibc/Makefile | 1 + tools/include/nolibc/inttypes.h | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 tools/include/nolibc/inttypes.h 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" -- 2.47.3