summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-06-15 02:39:50 +0000
committerSam James <sam@gentoo.org>2021-06-15 02:39:50 +0000
commit2d727dd766dd56973f855dba2437c1edcd4261c2 (patch)
tree449a381bde7ca9cc9cb46929d3e1a46b98639b8f
parentsci-biology/uchime: workaround failure with GCC 11 (diff)
downloadgentoo-2d727dd766dd56973f855dba2437c1edcd4261c2.tar.gz
gentoo-2d727dd766dd56973f855dba2437c1edcd4261c2.tar.bz2
gentoo-2d727dd766dd56973f855dba2437c1edcd4261c2.zip
net-dns/ndu: fix build with GCC 11
Closes: https://bugs.gentoo.org/786276 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--net-dns/ndu/files/ndu-0.4-fix-pointer-comparison-with-0.patch26
-rw-r--r--net-dns/ndu/ndu-0.4-r4.ebuild5
2 files changed, 29 insertions, 2 deletions
diff --git a/net-dns/ndu/files/ndu-0.4-fix-pointer-comparison-with-0.patch b/net-dns/ndu/files/ndu-0.4-fix-pointer-comparison-with-0.patch
new file mode 100644
index 000000000000..1d7a40d7aed4
--- /dev/null
+++ b/net-dns/ndu/files/ndu-0.4-fix-pointer-comparison-with-0.patch
@@ -0,0 +1,26 @@
+From 5df37d4e6a22a67671a4b74c68e725a9001fbac1 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 15 Jun 2021 02:38:33 +0000
+Subject: [PATCH] Fix pointer comparison with 0
+
+Closes: https://bugs.gentoo.org/786276
+---
+ src/ndu.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ndu.cpp b/src/ndu.cpp
+index 558ee45..8d3b353 100644
+--- a/src/ndu.cpp
++++ b/src/ndu.cpp
+@@ -404,7 +404,7 @@ public:
+ {
+ // see if file is a reverse file
+ // if the zone ends in .in-addr.arpa
+- if(strstr(name->pchar(), IN_ADDR_ARPA) > 0)
++ if(strstr(name->pchar(), IN_ADDR_ARPA) != 0)
+ {
+ zoneType = 1;
+ }
+--
+2.32.0
+
diff --git a/net-dns/ndu/ndu-0.4-r4.ebuild b/net-dns/ndu/ndu-0.4-r4.ebuild
index c63454d29b29..c8510ed983e7 100644
--- a/net-dns/ndu/ndu-0.4-r4.ebuild
+++ b/net-dns/ndu/ndu-0.4-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -12,13 +12,14 @@ HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc x86"
-IUSE=""
RDEPEND="sys-apps/ed" # dnstouch calls ed to do the dirty work
src_prepare() {
default
+
eapply "${FILESDIR}"/${P}-binary-locations.patch
+ eapply "${FILESDIR}"/${P}-fix-pointer-comparison-with-0.patch
# match our bind config
sed -e 's|0.0.127.in-addr.arpa|127.in-addr.arpa|g' -i ndu.conf || die