[Buildroot] [PATCH 1/1] package/yaml-cpp: fix build with newer gcc
Arnout Vandecappelle
arnout at rnout.be
Thu Dec 11 19:32:20 UTC 2025
In reply of:
> Fixes a build error not yet seen by the autobuilders due to other
> packages failing before. Seen with defconfig:
> https://autobuild.buildroot.net/results/ebf/ebf9a81f7e225ecdab20bbad8ad8daa136fddb46/
>
> Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
Applied to 2025.08.x. Thanks
> ---
> ...tterutils-Explicitly-include-cstdint.patch | 42 +++++++++++++++++++
> 1 file changed, 42 insertions(+)
> create mode 100644 package/yaml-cpp/0001-emitterutils-Explicitly-include-cstdint.patch
>
> diff --git a/package/yaml-cpp/0001-emitterutils-Explicitly-include-cstdint.patch b/package/yaml-cpp/0001-emitterutils-Explicitly-include-cstdint.patch
> new file mode 100644
> index 0000000000..e3dc308a2f
> --- /dev/null
> +++ b/package/yaml-cpp/0001-emitterutils-Explicitly-include-cstdint.patch
> @@ -0,0 +1,42 @@
> +From 7b469b4220f96fb3d036cf68cd7bd30bd39e61d2 Mon Sep 17 00:00:00 2001
> +From: Christopher Fore <csfore at posteo.net>
> +Date: Wed, 14 Aug 2024 21:02:32 -0400
> +Subject: [PATCH] emitterutils: Explicitly include <cstdint>
> +
> +GCC 15 will no longer include it by default, resulting in build
> +failures in projects that do not explicitly include it.
> +
> +Error:
> +src/emitterutils.cpp:221:11: error: 'uint16_t' was not declared in this scope
> + 221 | std::pair<uint16_t, uint16_t> EncodeUTF16SurrogatePair(int codePoint) {
> + | ^~~~~~~~
> +src/emitterutils.cpp:13:1: note: 'uint16_t' is defined in header '<cstdint>';
> +this is probably fixable by adding '#include <cstdint>'
> + 12 | #include "yaml-cpp/null.h"
> + +++ |+#include <cstdint>
> + 13 | #include "yaml-cpp/ostream_wrapper.h"
> +
> +Tests pass.
> +
> +Closes: #1307
> +See-also: https://gcc.gnu.org/pipermail/gcc-cvs/2024-August/407124.html
> +See-also: https://bugs.gentoo.org/937412
> +Signed-off-by: Christopher Fore <csfore at posteo.net>
> +
> +Upstream: https://github.com/jbeder/yaml-cpp/commit/7b469b4220f96fb3d036cf68cd7bd30bd39e61d2
> +
> +Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
> +---
> + src/emitterutils.cpp | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/src/emitterutils.cpp b/src/emitterutils.cpp
> +index fc41011a5..f801b1d0c 100644
> +--- a/src/emitterutils.cpp
> ++++ b/src/emitterutils.cpp
> +@@ -1,4 +1,5 @@
> + #include <algorithm>
> ++#include <cstdint>
> + #include <iomanip>
> + #include <sstream>
> +
> --
> 2.47.3
>
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
More information about the buildroot
mailing list