From 073cf0e94bb777241bef5cc594874b375fd422f4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Sun, 9 Nov 2014 16:25:40 +0100 Subject: [PATCH] - fix building on linux 3.17+ - rel 2 --- ixgbe.spec | 4 +++- linux-3.17.patch | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 linux-3.17.patch diff --git a/ixgbe.spec b/ixgbe.spec index b3d5c95..3d2e585 100644 --- a/ixgbe.spec +++ b/ixgbe.spec @@ -19,7 +19,7 @@ exit 1 %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 ikpkg %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%install_kernel_pkg ; done) -%define rel 1 +%define rel 2 %define pname ixgbe Summary: Intel(R) 10 Gigabit driver for Linux Summary(pl.UTF-8): Sterownik do karty Intel(R) 10 Gigabit @@ -30,6 +30,7 @@ License: GPL v2 Group: Base/Kernel Source0: http://downloads.sourceforge.net/e1000/%{pname}-%{version}.tar.gz # Source0-md5: 6ba474edde8c1fa205ee3b9a3af0587f +Patch0: linux-3.17.patch URL: http://sourceforge.net/projects/e1000/ %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2} BuildRequires: rpmbuild(macros) >= 1.678 @@ -94,6 +95,7 @@ EOF\ %prep %setup -q -n %{pname}-%{version} +%patch0 -p1 cp src/Makefile src/Makefile.%{name} cat > src/Makefile <<'EOF' diff --git a/linux-3.17.patch b/linux-3.17.patch new file mode 100644 index 0000000..252b777 --- /dev/null +++ b/linux-3.17.patch @@ -0,0 +1,14 @@ +--- ixgbe-3.22.3/src/ixgbe_ethtool.c~ 2014-08-15 01:17:42.000000000 +0200 ++++ ixgbe-3.22.3/src/ixgbe_ethtool.c 2014-11-09 16:24:37.428023145 +0100 +@@ -2881,7 +2881,11 @@ + + /* add filter to the list */ + if (parent) ++#if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0) ) + hlist_add_after(parent, &input->fdir_node); ++#else ++ hlist_add_behind(&input->fdir_node, parent); ++#endif + else + hlist_add_head(&input->fdir_node, + &adapter->fdir_filter_list); -- 2.44.0