From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1133692-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 25D86138334
	for <garchives@archives.gentoo.org>; Thu, 26 Dec 2019 13:10:04 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 5D3DFE0BC6;
	Thu, 26 Dec 2019 13:10:03 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 26E9EE0BC6
	for <gentoo-commits@lists.gentoo.org>; Thu, 26 Dec 2019 13:10:03 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 9D71834DB9A
	for <gentoo-commits@lists.gentoo.org>; Thu, 26 Dec 2019 13:10:01 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 1AAB934
	for <gentoo-commits@lists.gentoo.org>; Thu, 26 Dec 2019 13:10:00 +0000 (UTC)
From: "Jeroen Roovers" <jer@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Jeroen Roovers" <jer@gentoo.org>
Message-ID: <1577365798.4db35b3a2131c1973835b865106d3034d2e0635a.jer@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/nmap/files/, net-analyzer/nmap/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-analyzer/nmap/files/nmap-9999-constify-continued.patch net-analyzer/nmap/files/nmap-9999-netutil-else.patch net-analyzer/nmap/nmap-9999.ebuild
X-VCS-Directories: net-analyzer/nmap/files/ net-analyzer/nmap/
X-VCS-Committer: jer
X-VCS-Committer-Name: Jeroen Roovers
X-VCS-Revision: 4db35b3a2131c1973835b865106d3034d2e0635a
X-VCS-Branch: master
Date: Thu, 26 Dec 2019 13:10:00 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 1e1c76d9-514b-406e-98d2-7794701dfb62
X-Archives-Hash: 7aa169edba91272ce30c9aac8e2b2392

commit:     4db35b3a2131c1973835b865106d3034d2e0635a
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 26 13:09:45 2019 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Thu Dec 26 13:09:58 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4db35b3a

net-analyzer/nmap: Patch live ebuild

Package-Manager: Portage-2.3.83, Repoman-2.3.20
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 .../nmap/files/nmap-9999-constify-continued.patch  | 22 ++++++++++++++++++++++
 .../nmap/files/nmap-9999-netutil-else.patch        | 20 ++++++++++++++++++++
 net-analyzer/nmap/nmap-9999.ebuild                 |  2 ++
 3 files changed, 44 insertions(+)

diff --git a/net-analyzer/nmap/files/nmap-9999-constify-continued.patch b/net-analyzer/nmap/files/nmap-9999-constify-continued.patch
new file mode 100644
index 00000000000..04738f40823
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-9999-constify-continued.patch
@@ -0,0 +1,22 @@
+--- a/libnetutil/EthernetHeader.cc
++++ b/libnetutil/EthernetHeader.cc
+@@ -284,7 +284,7 @@ int EthernetHeader::setEtherType(u16 val){
+ 
+ 
+ /** Returns destination port in HOST byte order */
+-u16 EthernetHeader::getEtherType() const {
++const u16 EthernetHeader::getEtherType() const {
+   return ntohs(this->h.eth_type);
+ } /* End of getEtherType() */
+ 
+--- a/scan_engine.cc
++++ b/scan_engine.cc
+@@ -166,7 +166,7 @@ extern "C" int g_has_npcap_loopback;
+ #endif
+ 
+ 
+-int HssPredicate::operator() (const HostScanStats *lhs, const HostScanStats *rhs) const {
++const int HssPredicate::operator() (const HostScanStats *lhs, const HostScanStats *rhs) const {
+   const struct sockaddr_storage *lss, *rss;
+   lss = (lhs) ? lhs->target->TargetSockAddr() : ss;
+   rss = (rhs) ? rhs->target->TargetSockAddr() : ss;

diff --git a/net-analyzer/nmap/files/nmap-9999-netutil-else.patch b/net-analyzer/nmap/files/nmap-9999-netutil-else.patch
new file mode 100644
index 00000000000..a96a04b7a87
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-9999-netutil-else.patch
@@ -0,0 +1,20 @@
+--- a/libnetutil/netutil.cc
++++ b/libnetutil/netutil.cc
+@@ -2571,7 +2571,7 @@ const char *ippackethdrinfo(const u8 *packet, u32 len, int detail) {
+ 
+     /* CASE 4: where we (finally!) have a full 20 byte TCP header so we can
+      * safely print all fields */
+-    else { /* if (datalen >= 20) */
++    else if (datalen >= 20) {
+ 
+       /* TCP Flags */
+       p = tflags;
+@@ -2633,7 +2633,7 @@ const char *ippackethdrinfo(const u8 *packet, u32 len, int detail) {
+           (tcpoptinfo[0]!='\0') ? " " : "",
+           tcpoptinfo, ipinfo);
+       }
+-    } else{
++    } else {
+       /* If the packet does not fall into any other category, then we have a
+          really screwed-up packet. */
+       /* This ought to be unreachable; if static analysis flags it as such, delete it. */

diff --git a/net-analyzer/nmap/nmap-9999.ebuild b/net-analyzer/nmap/nmap-9999.ebuild
index 4c5cd498f49..c45c2c6b4ce 100644
--- a/net-analyzer/nmap/nmap-9999.ebuild
+++ b/net-analyzer/nmap/nmap-9999.ebuild
@@ -66,6 +66,8 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-7.25-libpcre.patch
 	"${FILESDIR}"/${PN}-7.31-libnl.patch
 	"${FILESDIR}"/${PN}-7.80-ac-config-subdirs.patch
+	"${FILESDIR}"/${PN}-9999-constify-continued.patch
+	"${FILESDIR}"/${PN}-9999-netutil-else.patch
 )
 S="${WORKDIR}/${MY_P}"