Skip to contentSkip to conversation

nodejs: fix build with gcc-15 on host

PATCH New [email protected] 1 participant 1 message Sep 15, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nodejs: fix build with gcc-15 on host

From: Martin Jansa <[email protected]>

---
 .../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
meta-oe/recipes-devtools/nodejs/nodejs/0001-src-fix-build-with-GCC-15.patch new file +33 -0
new file mode 100644
index 0000000000..9d09f4f482
@@ -0,0 +1,33 @@
+From bade7a1866618b9e46358b839fe5fdf16b1db2be Mon Sep 17 00:00:00 2001
+From: tjuhaszrh <[email protected]>
+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 <[email protected]>
+Reviewed-By: Chengzhong Wu <[email protected]>
+Reviewed-By: Richard Lau <[email protected]>
+Reviewed-By: James M Snell <[email protected]>
+
+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 <cstdint>
+ #include <memory>
+ #include <string>
+ #include <unordered_map>
meta-oe/recipes-devtools/nodejs/nodejs_20.18.2.bb +1 -0
index bef62f88eb..8af90e782a 100644
@@ -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 = " \