From b07b5ee86825cf4e74c173dbc0acf4fbb1ddc9ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Mon, 25 Aug 2014 23:03:04 +0200 Subject: [PATCH] - fix building with linux 3.16 - rel 2 --- linux-3.16.patch | 14 ++++++++++++++ r8168.spec | 4 +++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 linux-3.16.patch diff --git a/linux-3.16.patch b/linux-3.16.patch new file mode 100644 index 0000000..6a23eee --- /dev/null +++ b/linux-3.16.patch @@ -0,0 +1,14 @@ +--- r8168-8.038.00/src/r8168_n.c~ 2014-08-25 22:58:24.000000000 +0200 ++++ r8168-8.038.00/src/r8168_n.c 2014-08-25 23:00:52.314799987 +0200 +@@ -17542,7 +17542,11 @@ + + RTL_NET_DEVICE_OPS(rtl8168_netdev_ops); + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0) + SET_ETHTOOL_OPS(dev, &rtl8168_ethtool_ops); ++#else ++ dev->ethtool_ops = &rtl8168_ethtool_ops; ++#endif + + dev->watchdog_timeo = RTL8168_TX_TIMEOUT; + dev->irq = pdev->irq; diff --git a/r8168.spec b/r8168.spec index f19d452..d2f1347 100644 --- a/r8168.spec +++ b/r8168.spec @@ -19,7 +19,7 @@ exit 1 %define kpkg %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%kernel_pkg ; done) %define bkpkg %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%build_kernel_pkg ; done) -%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 @@ -35,6 +35,7 @@ URL: http://www.realtek.com.tw/ Source0: %{pname}-%{version}.tar.bz2 # Source0-md5: fe2962824587070a2ec53f77e40b0fea Patch0: linux-3.15.patch +Patch1: linux-3.16.patch BuildRequires: rpmbuild(macros) >= 1.678 %{?with_dist_kernel:%{expand:%kbrs}} BuildRoot: %{tmpdir}/%{pname}-%{version}-root-%(id -u -n) @@ -89,6 +90,7 @@ Express Gigabit Ethernet.\ %prep %setup -q -n %{pname}-%{version} %patch0 -p1 +%patch1 -p1 %build %{expand:%bkpkg} -- 2.43.0