[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250620100251.9877-3-w@1wt.eu>
Date: Fri, 20 Jun 2025 12:02:49 +0200
From: Willy Tarreau <w@....eu>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Cc: linux-kernel@...r.kernel.org, Willy Tarreau <w@....eu>
Subject: [PATCH 2/4] 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 stdint.h to better support these
programs.
Signed-off-by: Willy Tarreau <w@....eu>
---
tools/include/nolibc/Makefile | 1 +
tools/include/nolibc/inttypes.h | 8 ++++++++
2 files changed, 9 insertions(+)
create mode 100644 tools/include/nolibc/inttypes.h
diff --git a/tools/include/nolibc/Makefile b/tools/include/nolibc/Makefile
index f91d29705733a..725cf49516185 100644
--- a/tools/include/nolibc/Makefile
+++ b/tools/include/nolibc/Makefile
@@ -34,6 +34,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..1088034ef7cca
--- /dev/null
+++ b/tools/include/nolibc/inttypes.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: LGPL-2.1 OR MIT */
+
+#ifndef _NOLIBC_INTTYPES_H
+#define _NOLIBC_INTTYPES_H
+
+#include "stdint.h"
+
+#endif /* _NOLIBC_INTTYPES_H */
--
2.17.5
Powered by blists - more mailing lists