[packages/igb] - fix building on linux 4.1.9 - rel 2

baggins baggins at pld-linux.org
Thu Oct 1 08:17:58 CEST 2015


commit 871f90dfc25052e69241ec41119b84b105d9a860
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Oct 1 08:17:43 2015 +0200

    - fix building on linux 4.1.9
    - rel 2

 igb.spec          |  4 +++-
 linux-4.1.9.patch | 23 +++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)
---
diff --git a/igb.spec b/igb.spec
index a035f15..cf79a8a 100644
--- a/igb.spec
+++ b/igb.spec
@@ -6,7 +6,7 @@
 
 %define		_duplicate_files_terminate_build	0
 
-%define		rel	1
+%define		rel	2
 %define		pname	igb
 Summary:	Intel(R) PRO/1000 driver for Linux
 Summary(pl.UTF-8):	Sterownik do karty Intel(R) PRO/1000
@@ -17,6 +17,7 @@ License:	GPL v2
 Group:		Base/Kernel
 Source0:	http://downloads.sourceforge.net/e1000/%{pname}-%{version}.tar.gz
 # Source0-md5:	2d753a0bd03c949ec08d68c27540044d
+Patch0:		linux-4.1.9.patch
 URL:		http://sourceforge.net/projects/e1000/
 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}
 BuildRequires:	rpm-build-macros >= 1.701
@@ -80,6 +81,7 @@ EOF\
 
 %prep
 %setup -q -n %{pname}-%{version}
+%patch0 -p1
 
 cat > src/Makefile <<'EOF'
 obj-m := igb.o
diff --git a/linux-4.1.9.patch b/linux-4.1.9.patch
new file mode 100644
index 0000000..474286e
--- /dev/null
+++ b/linux-4.1.9.patch
@@ -0,0 +1,23 @@
+--- igb-5.3.3.2/src/kcompat.h~	2015-09-11 23:47:20.000000000 +0200
++++ igb-5.3.3.2/src/kcompat.h	2015-10-01 08:16:35.598629802 +0200
+@@ -4576,7 +4576,7 @@
+ #define HAVE_NDO_BRIDGE_GETLINK_NLFLAGS
+ #endif /* 4,1,0 */
+ 
+-#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) )
++#if ( (LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)) && !(LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,9)) )
+ #if (!(SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(12,1,0)))
+ static inline bool page_is_pfmemalloc(struct page *page)
+ {
+@@ -4589,8 +4589,10 @@
+ #endif /* !SLES12sp1 */
+ 
+ #else
+-#define HAVE_NDO_DFLT_BRIDGE_GETLINK_VLAN_SUPPORT
+ #undef HAVE_STRUCT_PAGE_PFMEMALLOC
+ #endif /* 4.2.0 */
++#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0) )
++#define HAVE_NDO_DFLT_BRIDGE_GETLINK_VLAN_SUPPORT
++#endif /* 4.2.0 */
+ 
+ #endif /* _KCOMPAT_H_ */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/igb.git/commitdiff/871f90dfc25052e69241ec41119b84b105d9a860



More information about the pld-cvs-commit mailing list