summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-01-04 04:04:34 +0000
committerSam James <sam@gentoo.org>2023-01-04 04:31:58 +0000
commit3f5e3993257185ecc33c3aca82a20a8f71997668 (patch)
tree16612d2bb6e418a1c144307a7aae5ad86b0ffdf1 /net-analyzer
parentsys-libs/tdb: fix runtime w/ clang 16 (diff)
downloadgentoo-3f5e3993257185ecc33c3aca82a20a8f71997668.tar.gz
gentoo-3f5e3993257185ecc33c3aca82a20a8f71997668.tar.bz2
gentoo-3f5e3993257185ecc33c3aca82a20a8f71997668.zip
net-analyzer/ngrep: fix build w/ clang 16
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/ngrep/files/ngrep-1.47-clang16.patch30
-rw-r--r--net-analyzer/ngrep/ngrep-1.47-r2.ebuild (renamed from net-analyzer/ngrep/ngrep-1.47-r1.ebuild)12
2 files changed, 39 insertions, 3 deletions
diff --git a/net-analyzer/ngrep/files/ngrep-1.47-clang16.patch b/net-analyzer/ngrep/files/ngrep-1.47-clang16.patch
new file mode 100644
index 000000000000..eb3758e8db2b
--- /dev/null
+++ b/net-analyzer/ngrep/files/ngrep-1.47-clang16.patch
@@ -0,0 +1,30 @@
+https://github.com/jpr5/ngrep/pull/28
+
+From 52515bae377f221b5473d9040f5f43ab1c672672 Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Mon, 19 Dec 2022 11:49:06 +0100
+Subject: [PATCH] Include <err.h> and "tcpkill.h" to avoid implicit function
+ declarations
+
+Implicit function declarations are a historic language feature that
+were removed from C in 1999.
+--- a/ngrep.c
++++ b/ngrep.c
+@@ -98,6 +98,7 @@
+ #endif
+
+ #include "ngrep.h"
++#include "tcpkill.h"
+
+
+ /*
+--- a/tcpkill.c
++++ b/tcpkill.c
+@@ -14,6 +14,7 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <string.h>
++#include <err.h>
+ #include <libnet.h>
+ #include <pcap.h>
+
diff --git a/net-analyzer/ngrep/ngrep-1.47-r1.ebuild b/net-analyzer/ngrep/ngrep-1.47-r2.ebuild
index 4dbf881dcf41..ccfd27b71f07 100644
--- a/net-analyzer/ngrep/ngrep-1.47-r1.ebuild
+++ b/net-analyzer/ngrep/ngrep-1.47-r2.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit autotools
@@ -26,10 +26,16 @@ RDEPEND="
acct-user/ngrep
"
-PATCHES=( "${FILESDIR}"/${PN}-1.47-regex.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.47-regex.patch
+ "${FILESDIR}"/${PN}-1.47-clang16.patch
+)
src_prepare() {
default
+
+ sed -i -e "s:configure.in:configure.ac:" regex*/{configure.in,Makefile.in} || die
+
eautoreconf
}