1 |
commit: 2d727dd766dd56973f855dba2437c1edcd4261c2 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 15 02:39:50 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 15 02:39:50 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d727dd7 |
7 |
|
8 |
net-dns/ndu: fix build with GCC 11 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/786276 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
.../ndu-0.4-fix-pointer-comparison-with-0.patch | 26 ++++++++++++++++++++++ |
14 |
net-dns/ndu/ndu-0.4-r4.ebuild | 5 +++-- |
15 |
2 files changed, 29 insertions(+), 2 deletions(-) |
16 |
|
17 |
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 |
18 |
new file mode 100644 |
19 |
index 00000000000..1d7a40d7aed |
20 |
--- /dev/null |
21 |
+++ b/net-dns/ndu/files/ndu-0.4-fix-pointer-comparison-with-0.patch |
22 |
@@ -0,0 +1,26 @@ |
23 |
+From 5df37d4e6a22a67671a4b74c68e725a9001fbac1 Mon Sep 17 00:00:00 2001 |
24 |
+From: Sam James <sam@g.o> |
25 |
+Date: Tue, 15 Jun 2021 02:38:33 +0000 |
26 |
+Subject: [PATCH] Fix pointer comparison with 0 |
27 |
+ |
28 |
+Closes: https://bugs.gentoo.org/786276 |
29 |
+--- |
30 |
+ src/ndu.cpp | 2 +- |
31 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
32 |
+ |
33 |
+diff --git a/src/ndu.cpp b/src/ndu.cpp |
34 |
+index 558ee45..8d3b353 100644 |
35 |
+--- a/src/ndu.cpp |
36 |
++++ b/src/ndu.cpp |
37 |
+@@ -404,7 +404,7 @@ public: |
38 |
+ { |
39 |
+ // see if file is a reverse file |
40 |
+ // if the zone ends in .in-addr.arpa |
41 |
+- if(strstr(name->pchar(), IN_ADDR_ARPA) > 0) |
42 |
++ if(strstr(name->pchar(), IN_ADDR_ARPA) != 0) |
43 |
+ { |
44 |
+ zoneType = 1; |
45 |
+ } |
46 |
+-- |
47 |
+2.32.0 |
48 |
+ |
49 |
|
50 |
diff --git a/net-dns/ndu/ndu-0.4-r4.ebuild b/net-dns/ndu/ndu-0.4-r4.ebuild |
51 |
index c63454d29b2..c8510ed983e 100644 |
52 |
--- a/net-dns/ndu/ndu-0.4-r4.ebuild |
53 |
+++ b/net-dns/ndu/ndu-0.4-r4.ebuild |
54 |
@@ -1,4 +1,4 @@ |
55 |
-# Copyright 1999-2020 Gentoo Authors |
56 |
+# Copyright 1999-2021 Gentoo Authors |
57 |
# Distributed under the terms of the GNU General Public License v2 |
58 |
|
59 |
EAPI=7 |
60 |
@@ -12,13 +12,14 @@ HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" |
61 |
LICENSE="GPL-2" |
62 |
SLOT="0" |
63 |
KEYWORDS="amd64 ppc x86" |
64 |
-IUSE="" |
65 |
|
66 |
RDEPEND="sys-apps/ed" # dnstouch calls ed to do the dirty work |
67 |
|
68 |
src_prepare() { |
69 |
default |
70 |
+ |
71 |
eapply "${FILESDIR}"/${P}-binary-locations.patch |
72 |
+ eapply "${FILESDIR}"/${P}-fix-pointer-comparison-with-0.patch |
73 |
|
74 |
# match our bind config |
75 |
sed -e 's|0.0.127.in-addr.arpa|127.in-addr.arpa|g' -i ndu.conf || die |