From db93848ead8c679acd6f778029aa66ecfeb16071 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Mon, 15 Sep 2025 11:00:46 +0200 Subject: [PATCH] nodejs: fix build with gcc-15 on host Signed-off-by: Martin Jansa Signed-off-by: Anuj Mittal --- .../0001-src-fix-build-with-GCC-15.patch | 33 +++++++++++++++++++ .../recipes-devtools/nodejs/nodejs_20.18.2.bb | 1 + 2 files changed, 34 insertions(+) create mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0001-src-fix-build-with-GCC-15.patch diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-src-fix-build-with-GCC-15.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-src-fix-build-with-GCC-15.patch new file mode 100644 index 0000000000..9d09f4f482 --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-src-fix-build-with-GCC-15.patch @@ -0,0 +1,33 @@ +From bade7a1866618b9e46358b839fe5fdf16b1db2be Mon Sep 17 00:00:00 2001 +From: tjuhaszrh +Date: Sat, 25 Jan 2025 10:34:54 +0100 +Subject: [PATCH] src: fix build with GCC 15 + +Added cstdint to worker_inspector as on more recent version of gcc +the build was failing due to changes to libstdc++ and the removal +of transitive includes. + +PR-URL: https://github.com/nodejs/node/pull/56740 +Fixes: https://github.com/nodejs/node/issues/56731 +Reviewed-By: Antoine du Hamel +Reviewed-By: Chengzhong Wu +Reviewed-By: Richard Lau +Reviewed-By: James M Snell + +Upstream-Status: Backport [https://github.com/nodejs/node/commit/bade7a1866618b9e46358b839fe5fdf16b1db2be] +--- + src/inspector/worker_inspector.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/inspector/worker_inspector.h b/src/inspector/worker_inspector.h +index d3254d5aa0ebe4..24403bb1704c40 100644 +--- a/src/inspector/worker_inspector.h ++++ b/src/inspector/worker_inspector.h +@@ -5,6 +5,7 @@ + #error("This header can only be used when inspector is enabled") + #endif + ++#include + #include + #include + #include diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_20.18.2.bb b/meta-oe/recipes-devtools/nodejs/nodejs_20.18.2.bb index bef62f88eb..8af90e782a 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs_20.18.2.bb +++ b/meta-oe/recipes-devtools/nodejs/nodejs_20.18.2.bb @@ -27,6 +27,7 @@ SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ file://libatomic.patch \ file://182d9c05e78.patch \ file://zlib-fix-pointer-alignment.patch \ + file://0001-src-fix-build-with-GCC-15.patch \ file://run-ptest \ " SRC_URI:append:class-target = " \