commit 7ee29dfc0881ca81da702eb2d9b241cba70d3fae
Author: Jan Rękorajski <[email protected]>
Date:   Tue May 7 18:43:55 2019 +0200

    - fix building with kernel 5.1
    - rel 2

 ipset.spec       |  4 +++-
 kernel-5.1.patch | 15 +++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
---
diff --git a/ipset.spec b/ipset.spec
index e5af3cd..7946b32 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
@@ -36,6 +36,7 @@ Source0:      
http://ipset.netfilter.org/%{pname}-%{version}.tar.bz2
 # Source0-md5: 72b477d1ce076d681b0799f88280f2f3
 Source1:       %{pname}.init
 Patch0:                kernel-5.0.patch
+Patch1:                kernel-5.1.patch
 URL:           http://ipset.netfilter.org/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
@@ -187,6 +188,7 @@ done\
 %prep
 %setup -q -n %{pname}-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__aclocal}
diff --git a/kernel-5.1.patch b/kernel-5.1.patch
new file mode 100644
index 0000000..d148aee
--- /dev/null
+++ b/kernel-5.1.patch
@@ -0,0 +1,15 @@
+--- ipset-7.1/kernel/net/netfilter/ipset/ip_set_hash_gen.h~    2018-12-10 
18:35:31.000000000 +0100
++++ ipset-7.1/kernel/net/netfilter/ipset/ip_set_hash_gen.h     2019-05-07 
18:42:08.063827159 +0200
+@@ -666,8 +666,11 @@
+       spin_unlock_bh(&set->lock);
+ 
+       /* Give time to other readers of the set */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
++      synchronize_rcu();
++#else
+       synchronize_rcu_bh();
+-
++#endif
+       pr_debug("set %s resized from %u (%p) to %u (%p)\n", set->name,
+                orig->htable_bits, orig, t->htable_bits, t);
+       /* If there's nobody else dumping the table, destroy it */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ipset.git/commitdiff/7ee29dfc0881ca81da702eb2d9b241cba70d3fae

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to