commit:     b6889811fb8d2d971d53714bfa5f54d9c88de1be
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  1 22:31:42 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun  1 22:31:42 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6889811

net-libs/nghttp2: fix build w/ GCC 16

Doesn't affect an installed header, though.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-libs/nghttp2/files/nghttp2-1.65.0-gcc16.patch | 29 +++++++++++++++++++++++
 net-libs/nghttp2/nghttp2-1.65.0-r2.ebuild         |  4 ++++
 2 files changed, 33 insertions(+)

diff --git a/net-libs/nghttp2/files/nghttp2-1.65.0-gcc16.patch 
b/net-libs/nghttp2/files/nghttp2-1.65.0-gcc16.patch
new file mode 100644
index 000000000000..9ec939854044
--- /dev/null
+++ b/net-libs/nghttp2/files/nghttp2-1.65.0-gcc16.patch
@@ -0,0 +1,29 @@
+https://github.com/nghttp2/nghttp2/commit/1440e883475488ddda25556c7b3d9f78694716ba
+
+From 1440e883475488ddda25556c7b3d9f78694716ba Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <[email protected]>
+Date: Fri, 30 May 2025 21:20:51 +0100
+Subject: [PATCH] src/template.h: add missing `cstdint` include
+
+Without the change build against upcoming gcc-16 fails as:
+
+    template.h:457:9: error: ISO C++ forbids declaration of 'type name' with 
no type [-fpermissive]
+      457 |   const uint8_t, N == std::dynamic_extent ? std::dynamic_extent : 
N * sizeof(T)>
+          |         ^~~~~~~
+---
+ src/template.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/template.h b/src/template.h
+index e154057fd4..4f0622b2c4 100644
+--- a/src/template.h
++++ b/src/template.h
+@@ -27,6 +27,7 @@
+ 
+ #include "nghttp2_config.h"
+ 
++#include <cstdint>
+ #include <cstring>
+ #include <cstdio>
+ #include <cstdlib>
+

diff --git a/net-libs/nghttp2/nghttp2-1.65.0-r2.ebuild 
b/net-libs/nghttp2/nghttp2-1.65.0-r2.ebuild
index c8f2aa55d585..dd90ced922b2 100644
--- a/net-libs/nghttp2/nghttp2-1.65.0-r2.ebuild
+++ b/net-libs/nghttp2/nghttp2-1.65.0-r2.ebuild
@@ -40,6 +40,10 @@ RDEPEND="
 DEPEND="${RDEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-gcc16.patch
+)
+
 src_prepare() {
        default
        [[ ${PV} == 9999 ]] && eautoreconf

Reply via email to