%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
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
%prep
%setup -q -n %{pname}-%{version}
+%patch0 -p1
cat > src/Makefile <<'EOF'
obj-m := igb.o
--- /dev/null
+--- 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_ */