coova-chilli: fix kernel >= 5.17 compile
Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
This commit is contained in:
parent
df0313880e
commit
778ce3c977
2 changed files with 35 additions and 1 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=coova-chilli
|
||||
PKG_VERSION:=1.6
|
||||
PKG_RELEASE:=9.1
|
||||
PKG_RELEASE:=10
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/coova/coova-chilli/tar.gz/$(PKG_VERSION)?
|
||||
|
|
34
net/coova-chilli/patches/011-kernel517.patch
Normal file
34
net/coova-chilli/patches/011-kernel517.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
From: John Thomson <git@johnthomson.fastmail.com.au>
|
||||
Date: 21 Oct 2022 13:00:00 +1000
|
||||
Subject: [PATCH] xt_coova: fix kernel>=5.17
|
||||
|
||||
Linux kernel 5.17 removed PDE_DATA, and replaced it with pde_data [0]
|
||||
|
||||
[0]: https://github.com/torvalds/linux/commit/359745d78351c6f5442435f81549f0207ece28aa
|
||||
|
||||
Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
|
||||
|
||||
--- a/src/linux/xt_coova.c
|
||||
+++ b/src/linux/xt_coova.c
|
||||
@@ -470,7 +470,9 @@ static int coova_seq_open(struct inode *
|
||||
if (st == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
|
||||
+ st->table = pde_data(inode);
|
||||
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
|
||||
st->table = PDE_DATA(inode);
|
||||
#else
|
||||
st->table = pde->data;
|
||||
@@ -482,7 +484,9 @@ static ssize_t
|
||||
coova_mt_proc_write(struct file *file, const char __user *input,
|
||||
size_t size, loff_t *loff)
|
||||
{
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
|
||||
+ struct coova_table *t = pde_data(file_inode(file));
|
||||
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
|
||||
struct coova_table *t = PDE_DATA(file_inode(file));
|
||||
#else
|
||||
const struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode);
|
Loading…
Reference in a new issue