Fix error: call to undeclared function 'skb_gso_segment';
[PATCH] linux 6.4.10 build fix
Fix error: call to undeclared function 'skb_gso_segment'; 0001-PATCH-linux-6.4-build-fix.patch
From d2324a5db2954250ed2163b239aa302055580849 Mon Sep 17 00:00:00 2001
From: Masato TOYOSHIMA <phoepsilonix@phoepsilonix.love>
Date: Sat, 12 Aug 2023 19:13:09 +0900
Subject: [PATCH] linux 6.4 build fix
---
PKGBUILD | 6 ++++--
linux64.patch | 18 ++++++++++++++++++
2 files changed, 22 insertions(+), 2 deletions(-)
create mode 100644 linux64.patch
diff --git a/PKGBUILD b/PKGBUILD
index 00c6eab..1454c72 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,11 +20,12 @@ makedepends=("$_linuxprefix-headers")
provides=("$_pkgname=$pkgver")
groups=("$_linuxprefix-extramodules")
source=("https://github.com/mtorromeo/r8168/archive/refs/tags/$pkgver.tar.gz"
- 'linux518.patch' 'linux519.patch' 'linux61.patch')
+ 'linux518.patch' 'linux519.patch' 'linux61.patch' 'linux64.patch')
sha256sums=('76f9e7c26a8ade7b01dd34060f5b17d74387f15e9b6baa6dbba8c43634a31ce6'
'd8d542770e504775600f686d03412a37cc32489872be7aeb388b5b08d9806096'
'f19c663f278096a93b2fc80222e208a54ab8677f6d7eeb9c15150c7c55ec2eff'
- 'b43a2ec8270124afe6fa23fafc1be156779e9a0d47db22e1583b60891bd286d5')
+ 'b43a2ec8270124afe6fa23fafc1be156779e9a0d47db22e1583b60891bd286d5'
+ '46b3b404d20b0fc2b46028fca4e9a328134c14f7d2d595b432f9c4bb1f7a93a8')
install=$_pkgname.install
@@ -33,6 +34,7 @@ prepare() {
patch -p1 -i ../linux518.patch
patch -p1 -i ../linux519.patch
patch -p1 -i ../linux61.patch
+ patch -p1 -i ../linux64.patch
}
build() {
diff --git a/linux64.patch b/linux64.patch
new file mode 100644
index 0000000..f44a857
--- /dev/null
+++ b/linux64.patch
@@ -0,0 +1,18 @@
+diff --git a/src/r8168_n.c b/src/r8168_n.c
+index 7e9e2ea..8716c69 100755
+--- a/src/r8168_n.c
++++ b/src/r8168_n.c
+@@ -81,6 +81,10 @@
+ #include <linux/mdio.h>
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,4,10)
++#include <net/gso.h>
++#endif
++
+ #include <asm/io.h>
+ #include <asm/irq.h>
+
+--
+2.40.1
+
--
2.41.0