[packages/ipset] - fix building with kernel 5.16, rel 2

baggins baggins at pld-linux.org
Thu Jan 20 22:18:06 CET 2022


commit 8e2a922b3f432b58a65ba2bc34fd44982a6e1e78
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Jan 20 22:17:38 2022 +0100

    - fix building with kernel 5.16, rel 2

 ipset.spec        |  4 +++-
 kernel-5.16.patch | 22 ++++++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)
---
diff --git a/ipset.spec b/ipset.spec
index 6e5cbe2..bb37513 100644
--- a/ipset.spec
+++ b/ipset.spec
@@ -22,7 +22,7 @@ exit 1
 %define		_enable_debug_packages	0
 %endif
 
-%define		rel	1
+%define		rel	2
 %define		pname	ipset
 Summary:	IP sets utility
 Summary(pl.UTF-8):	Narzędzie do zarządzania zbiorami IP
@@ -35,6 +35,7 @@ Group:		Networking/Admin
 Source0:	https://ipset.netfilter.org/%{pname}-%{version}.tar.bz2
 # Source0-md5:	b681a86dbdb2d9726245af739bca01ac
 Source1:	%{pname}.init
+Patch0:		kernel-5.16.patch
 URL:		https://ipset.netfilter.org/
 BuildRequires:	autoconf >= 2.63
 BuildRequires:	automake
@@ -184,6 +185,7 @@ done\
 
 %prep
 %setup -q -n %{pname}-%{version}
+%patch0 -p1
 
 %build
 %{__aclocal}
diff --git a/kernel-5.16.patch b/kernel-5.16.patch
new file mode 100644
index 0000000..06d55e0
--- /dev/null
+++ b/kernel-5.16.patch
@@ -0,0 +1,22 @@
+--- ipset-7.15/configure.ac~	2021-08-04 08:18:14.000000000 +0200
++++ ipset-7.15/configure.ac	2022-01-20 22:11:42.308828836 +0100
+@@ -450,7 +450,7 @@
+ 
+ AC_MSG_CHECKING([kernel source for kvfree])
+ if test -f $ksourcedir/include/linux/mm.h && \
+-   $GREP -q 'kvfree' $ksourcedir/include/linux/mm.h; then
++   $GREP -q 'kvfree' $ksourcedir/include/linux/mm.h $ksourcedir/include/linux/slab.h; then
+ 	AC_MSG_RESULT(yes)
+ 	AC_SUBST(HAVE_KVFREE, define)
+ else
+--- ipset-7.15/configure.ac~	2022-01-20 22:12:29.000000000 +0100
++++ ipset-7.15/configure.ac	2022-01-20 22:13:17.434329590 +0100
+@@ -839,7 +839,7 @@
+ 
+ AC_MSG_CHECKING([kernel source for kvzalloc() in mm.h])
+ if test -f $ksourcedir/include/linux/mm.h && \
+-   $GREP -q 'static inline void \*kvzalloc(' $ksourcedir/include/linux/mm.h; then
++   $GREP -q ' void \*kvzalloc(' $ksourcedir/include/linux/mm.h $ksourcedir/include/linux/slab.h; then
+ 	AC_MSG_RESULT(yes)
+ 	AC_SUBST(HAVE_KVZALLOC, define)
+ else
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ipset.git/commitdiff/8e2a922b3f432b58a65ba2bc34fd44982a6e1e78



More information about the pld-cvs-commit mailing list