[packages/r8168] - fix building with linux 4.0 - rel 2
baggins
baggins at pld-linux.org
Sun Apr 19 13:35:36 CEST 2015
commit e0085fece71adfad9b0ee0c6dfaf52fffe68555d
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Apr 19 13:35:22 2015 +0200
- fix building with linux 4.0
- rel 2
linux-4.0.patch | 16 ++++++++++++++++
r8168.spec | 4 +++-
2 files changed, 19 insertions(+), 1 deletion(-)
---
diff --git a/r8168.spec b/r8168.spec
index 448442f..83f058e 100644
--- a/r8168.spec
+++ b/r8168.spec
@@ -4,7 +4,7 @@
# nothing to be placed to debuginfo package
%define _enable_debug_packages 0
-%define rel 1
+%define rel 2
%define pname r8168
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
@@ -19,6 +19,7 @@ URL: http://www.realtek.com.tw/
# unfortunately this download is not DF-friendly.
Source0: %{pname}-%{version}.tar.bz2
# Source0-md5: 98314a558a4c667d7652d5dbdd0f0579
+Patch0: linux-4.0.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/linux-4.0.patch b/linux-4.0.patch
new file mode 100644
index 0000000..652e27c
--- /dev/null
+++ b/linux-4.0.patch
@@ -0,0 +1,16 @@
+--- r8168-8.039.00/src/r8168_n.c.orig 2015-04-19 13:32:19.399796241 +0200
++++ r8168-8.039.00/src/r8168_n.c 2015-04-19 13:34:01.866459293 +0200
+@@ -3291,9 +3291,12 @@
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0)
+ tag = (tp->vlgrp && vlan_tx_tag_present(skb)) ?
+ TxVlanTag | swab16(vlan_tx_tag_get(skb)) : 0x00;
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
+ tag = (vlan_tx_tag_present(skb)) ?
+ TxVlanTag | swab16(vlan_tx_tag_get(skb)) : 0x00;
++#else
++ tag = (tp->vlgrp && skb_vlan_tag_present(skb)) ?
++ TxVlanTag | swab16(skb_vlan_tag_get(skb)) : 0x00;
+ #endif
+
+ return tag;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/r8168.git/commitdiff/e0085fece71adfad9b0ee0c6dfaf52fffe68555d
More information about the pld-cvs-commit
mailing list