commit:     d32e53b010c752d3910dc58ac33ba692229e1ec2
Author:     YiFei Zhu <zhuyifei1999 <AT> gmail <DOT> com>
AuthorDate: Tue Jan  6 04:51:16 2026 +0000
Commit:     YiFei Zhu <zhuyifei1999 <AT> gmail <DOT> com>
CommitDate: Tue Jan  6 04:51:16 2026 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d32e53b0

net-analyzer/netsniff-ng: Fix build with GCC 15

Signed-off-by: YiFei Zhu <zhuyifei1999 <AT> gmail.com>

 .../files/netsniff-ng-0.6.9-gcc-15.patch           | 35 ++++++++++++++++++++++
 .../netsniff-ng/netsniff-ng-0.6.8-r1.ebuild        |  4 +++
 net-analyzer/netsniff-ng/netsniff-ng-0.6.9.ebuild  |  4 +++
 3 files changed, 43 insertions(+)

diff --git a/net-analyzer/netsniff-ng/files/netsniff-ng-0.6.9-gcc-15.patch 
b/net-analyzer/netsniff-ng/files/netsniff-ng-0.6.9-gcc-15.patch
new file mode 100644
index 0000000000..9b01ba293b
--- /dev/null
+++ b/net-analyzer/netsniff-ng/files/netsniff-ng-0.6.9-gcc-15.patch
@@ -0,0 +1,35 @@
+From 1af7ae33e3e8178ab5c649c3a52838d4375c4228 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <[email protected]>
+Date: Tue, 10 Jun 2025 14:47:54 +0200
+Subject: [PATCH] mausezahn: fixed compilation with gcc-15
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+gcc-15 by default uses C23 standard which is more strict on forward
+declarations.
+
+Original report: https://bugzilla.redhat.com/show_bug.cgi?id=2340924
+
+Signed-off-by: Jaroslav Škarvada <[email protected]>
+---
+ staging/mops.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/staging/mops.h b/staging/mops.h
+index cf19f098..ae3769a7 100644
+--- a/staging/mops.h
++++ b/staging/mops.h
+@@ -940,9 +940,9 @@ int mops_direct(char* dev, int mops_type, char* argstring);
+ 
+ 
+ struct automops * automops_init(void);
+-struct automops * automops_alloc_protocol();
+-struct automops * automops_delete_protocol();
+-struct automops * automops_search_protocol();
++struct automops * automops_alloc_protocol(struct automops *cur);
++struct automops * automops_delete_protocol(struct automops *cur);
++struct automops * automops_search_protocol(struct automops *list, char *name);
+ int               automops_dump_all (struct automops* list);
+ void              automops_set_defaults(struct automops * cur);
+ struct fields *   automops_add_field (struct automops *amp);

diff --git a/net-analyzer/netsniff-ng/netsniff-ng-0.6.8-r1.ebuild 
b/net-analyzer/netsniff-ng/netsniff-ng-0.6.8-r1.ebuild
index de43f7aafb..a9e709bac5 100644
--- a/net-analyzer/netsniff-ng/netsniff-ng-0.6.8-r1.ebuild
+++ b/net-analyzer/netsniff-ng/netsniff-ng-0.6.8-r1.ebuild
@@ -38,6 +38,10 @@ BDEPEND="
        virtual/pkgconfig
 "
 
+PATCHES=(
+       "${FILESDIR}/netsniff-ng-0.6.9-gcc-15.patch"
+)
+
 src_prepare() {
        default
 

diff --git a/net-analyzer/netsniff-ng/netsniff-ng-0.6.9.ebuild 
b/net-analyzer/netsniff-ng/netsniff-ng-0.6.9.ebuild
index 5fffa1ef41..51a0c4acc9 100644
--- a/net-analyzer/netsniff-ng/netsniff-ng-0.6.9.ebuild
+++ b/net-analyzer/netsniff-ng/netsniff-ng-0.6.9.ebuild
@@ -38,6 +38,10 @@ BDEPEND="
        virtual/pkgconfig
 "
 
+PATCHES=(
+       "${FILESDIR}/netsniff-ng-0.6.9-gcc-15.patch"
+)
+
 src_prepare() {
        default
 

Reply via email to