r8152: fix build under kernel 4.14

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2022-04-08 00:41:53 +08:00
parent b4633aecc5
commit f05086ac09
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -0,0 +1,30 @@
From 3295cef0552f0fa64b753f1e5a8ac81307260ae5 Mon Sep 17 00:00:00 2001
From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com>
Date: Sun, 3 Apr 2022 23:50:38 +0800
Subject: [PATCH] Fix compilation issue under kernel 4.14
---
compatibility.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/compatibility.h b/compatibility.h
index 1e2d3d8..fb981a0 100644
--- a/compatibility.h
+++ b/compatibility.h
@@ -549,12 +549,14 @@
linkmode_clear_bit(nr, addr);
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,217) || LINUX_VERSION_CODE < KERNEL_VERSION(4,19,10)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,19,10)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,217) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
static inline void skb_mark_not_on_list(struct sk_buff *skb)
{
skb->next = NULL;
}
-#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,14,217) || LINUX_VERSION_CODE < KERNEL_VERSION(4,19,10) */
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,14,217) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) */
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,19,10) */
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0) */
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,1,0) */
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0) */