commit:     7ce35657f269c3b7016e8940ad36e59cf06e12a4
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 16 09:59:03 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Dec 16 10:03:00 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ce35657

net-dns/pdnsd: Fixed build with >=sys-kernel/linux-headers-5.13

update EAPI 7 -> 8

Thanks-to: Alexandros C. Couloumbis <alex <AT> ozo.com>
Closes: https://bugs.gentoo.org/801688
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../files/pdnsd-1.2.9a-linux-5.13_build_fix.patch  | 39 ++++++++++++++++++++++
 net-dns/pdnsd/pdnsd-1.2.9a-r2.ebuild               |  6 +++-
 2 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/net-dns/pdnsd/files/pdnsd-1.2.9a-linux-5.13_build_fix.patch 
b/net-dns/pdnsd/files/pdnsd-1.2.9a-linux-5.13_build_fix.patch
new file mode 100644
index 000000000000..fbc1e0bfd4ec
--- /dev/null
+++ b/net-dns/pdnsd/files/pdnsd-1.2.9a-linux-5.13_build_fix.patch
@@ -0,0 +1,39 @@
+From 59859acf9083010639eb9bc0bf8cb5d03f03935f Mon Sep 17 00:00:00 2001
+From: SiYao Mo <msy...@vip.qq.com>
+Date: Fri, 16 Jul 2021 14:25:44 +0800
+Subject: [PATCH] pdnsd-alt: fix cmake error in kernel 5.13/5.14 Because of
+ redefinition of 'struct ifmap' & 'struct ifreq' & 'struct ifconf' in
+ linux/if.h (Linux Kernel above 5.13) Replace net/if.h with linux/if.h
+
+Signed-off-by: SiYao Mo <msy...@vip.qq.com>
+---
+ src/conff.h | 2 +-
+ src/dns.h   | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/conff.h b/src/conff.h
+index a07b156..c66d210 100644
+--- a/src/conff.h
++++ b/src/conff.h
+@@ -32,7 +32,7 @@
+ #include <stdio.h>
+ #include <pthread.h>
+ #include <sys/socket.h>
+-#include <net/if.h>
++#include <linux/if.h>
+ #include "ipvers.h"
+ #include "list.h"
+ 
+diff --git a/src/dns.h b/src/dns.h
+index 0f6a4ac..ecc9680 100644
+--- a/src/dns.h
++++ b/src/dns.h
+@@ -27,7 +27,7 @@
+ #include <config.h>
+ #include <arpa/inet.h>
+ #include <sys/socket.h>
+-#include <net/if.h>
++#include <linux/if.h>
+ #include <sys/types.h>
+ #include <inttypes.h>
+ #include "rr_types.h"

diff --git a/net-dns/pdnsd/pdnsd-1.2.9a-r2.ebuild 
b/net-dns/pdnsd/pdnsd-1.2.9a-r2.ebuild
index 209fff4708a5..e22913999e9a 100644
--- a/net-dns/pdnsd/pdnsd-1.2.9a-r2.ebuild
+++ b/net-dns/pdnsd/pdnsd-1.2.9a-r2.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit systemd tmpfiles
 
@@ -21,6 +21,10 @@ RDEPEND="
 "
 DEPEND="test? ( net-dns/bind-tools )"
 
+PATCHES=(
+       "${FILESDIR}/${P}-linux-5.13_build_fix.patch" #801688
+)
+
 src_configure() {
        local myeconfargs=(
                --disable-isdn

Reply via email to