[packages/r8168] - up to 8.047.05 - fix building with kernel 5.4

baggins baggins at pld-linux.org
Sat Nov 30 23:58:14 CET 2019


commit 8f8e7110b182f78db33a6039a9c6c20439bed846
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Nov 30 23:57:31 2019 +0100

    - up to 8.047.05
    - fix building with kernel 5.4

 kernel-5.4.patch | 11 +++++++++++
 r8168.spec       |  6 ++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/r8168.spec b/r8168.spec
index 2ceab7a..e83b286 100644
--- a/r8168.spec
+++ b/r8168.spec
@@ -9,7 +9,7 @@
 Summary:	Linux driver for RTL8111/8168B PCI Express Gigabit Ethernet controllers
 Summary(pl.UTF-8):	Linuksowy sterownik dla kart sieciowych RTL8111/8168B PCI Express Gigabit Ethernet
 Name:		%{pname}%{_alt_kernel}
-Version:	8.047.01
+Version:	8.047.05
 Release:	%{rel}%{?_pld_builder:@%{_kernel_ver_str}}
 License:	GPL
 Group:		Base/Kernel
@@ -18,7 +18,8 @@ URL:		http://www.realtek.com.tw/
 # https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software
 # unfortunately this download is not DF-friendly.
 Source0:	%{pname}-%{version}.tar.bz2
-# Source0-md5:	1d4e403cf7fa579b1bd02adc33336cbb
+# Source0-md5:	d239300e229061c449848707819c1d0d
+Patch0:		kernel-5.4.patch
 BuildRequires:	rpmbuild(macros) >= 1.701
 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}
 BuildRoot:	%{tmpdir}/%{pname}-%{version}-root-%(id -u -n)
@@ -70,6 +71,7 @@ Express Gigabit Ethernet.\
 
 %prep
 %setup -q -n %{pname}-%{version}
+%patch0 -p1
 
 %build
 %{expand:%build_kernel_packages}
diff --git a/kernel-5.4.patch b/kernel-5.4.patch
new file mode 100644
index 0000000..4dfb03c
--- /dev/null
+++ b/kernel-5.4.patch
@@ -0,0 +1,11 @@
+--- r8168-8.047.01/src/r8168_n.c~	2019-04-01 17:58:10.000000000 +0200
++++ r8168-8.047.01/src/r8168_n.c	2019-11-30 23:52:41.804500848 +0100
+@@ -56,7 +56,7 @@
+ #include <linux/rtnetlink.h>
+ #include <linux/completion.h>
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0))
+ #include <linux/pci-aspm.h>
+ #endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,37)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/r8168.git/commitdiff/8f8e7110b182f78db33a6039a9c6c20439bed846



More information about the pld-cvs-commit mailing list