commit:     46c56624cb102d92322d978909f853e0d2e6870a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct  1 00:21:14 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct  1 00:21:14 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46c56624

net-analyzer/sniffit: fix build w/ Clang 16

Closes: https://bugs.gentoo.org/870997
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/sniffit-0.5.0-implicit-func-decl.patch   | 50 ++++++++++++++++++++++
 .../{sniffit-0.5.ebuild => sniffit-0.5-r1.ebuild}  | 16 ++++---
 2 files changed, 59 insertions(+), 7 deletions(-)

diff --git a/net-analyzer/sniffit/files/sniffit-0.5.0-implicit-func-decl.patch 
b/net-analyzer/sniffit/files/sniffit-0.5.0-implicit-func-decl.patch
new file mode 100644
index 000000000000..e6ee580d6e33
--- /dev/null
+++ b/net-analyzer/sniffit/files/sniffit-0.5.0-implicit-func-decl.patch
@@ -0,0 +1,50 @@
+https://github.com/resurrecting-open-source-projects/sniffit/pull/3
+
+From a05340968343d9f61f57506ed00bff0a62d3f38e Mon Sep 17 00:00:00 2001
+From: Sam James <s...@gentoo.org>
+Date: Thu, 28 Jul 2022 12:14:44 +0100
+Subject: [PATCH] Fix -Wimplicit-function-declaration
+
+--- a/src/sn_cfgfile.c
++++ b/src/sn_cfgfile.c
+@@ -2,6 +2,7 @@
+ /*   - by          : Brecht Claerhout                                     */
+ /*   - improvements: Shudoh Kazuyuki                                      */
+ 
++#include <ctype.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+--- a/src/sn_generation.c
++++ b/src/sn_generation.c
+@@ -13,7 +13,9 @@
+ #include "sn_curses.h"
+ #include "sn_defines.h"
+ #include "sn_structs.h"
++#include "sn_packets.h"
+ #include "sn_generation.h"
++#include "sn_interface.h"
+ 
+ extern volatile int screen_busy;
+ 
+--- a/src/sn_interface.c
++++ b/src/sn_interface.c
+@@ -4,6 +4,7 @@
+ #include "sn_config.h"
+ 
+ #ifdef INCLUDE_INTERFACE
++#include <ctype.h>
+ #include <signal.h>
+ #include <termios.h>
+ #include <stdlib.h>
+--- a/src/sniffit.c
++++ b/src/sniffit.c
+@@ -3,6 +3,7 @@
+ 
+ #include "sn_config.h"                /* Config header file */
+ 
++#include <ctype.h>
+ #include <unistd.h>
+ #include <signal.h>
+ #include <stdlib.h>
+

diff --git a/net-analyzer/sniffit/sniffit-0.5.ebuild 
b/net-analyzer/sniffit/sniffit-0.5-r1.ebuild
similarity index 77%
rename from net-analyzer/sniffit/sniffit-0.5.ebuild
rename to net-analyzer/sniffit/sniffit-0.5-r1.ebuild
index 3be66ceda23e..1247440f794f 100644
--- a/net-analyzer/sniffit/sniffit-0.5.ebuild
+++ b/net-analyzer/sniffit/sniffit-0.5-r1.ebuild
@@ -1,27 +1,29 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
+
 inherit autotools
 
 DESCRIPTION="Interactive Packet Sniffer"
 HOMEPAGE="https://github.com/resurrecting-open-source-projects/sniffit";
 
SRC_URI="https://github.com/resurrecting-open-source-projects/sniffit/archive/${P}.tar.gz";
-SLOT="0"
+S="${WORKDIR}"/${PN}-${P}
+
 LICENSE="BSD"
+SLOT="0"
 KEYWORDS="amd64 ppc sparc x86"
 
 RDEPEND="
        net-libs/libpcap
        >=sys-libs/ncurses-5.2
 "
-DEPEND="
-       ${RDEPEND}
-"
+DEPEND="${RDEPEND}"
+
 PATCHES=(
        "${FILESDIR}"/${PN}-0.4.0-tinfo.patch
+       "${FILESDIR}"/${PN}-0.5.0-implicit-func-decl.patch
 )
-S=${WORKDIR}/${PN}-${P}
 
 src_prepare() {
        default

Reply via email to