diff options
author | James Le Cuirot <chewi@gentoo.org> | 2017-05-13 20:38:18 +0100 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2017-05-13 20:39:49 +0100 |
commit | 2a44760d0dc295cd1f9c3a85a487833034f5e95a (patch) | |
tree | 4a410b5a5839d46246eb82b62433a50e24072651 /net-misc/r8168 | |
parent | sys-apps/hwloc: Port to EAPI 6 (diff) | |
download | gentoo-2a44760d0dc295cd1f9c3a85a487833034f5e95a.tar.gz gentoo-2a44760d0dc295cd1f9c3a85a487833034f5e95a.tar.bz2 gentoo-2a44760d0dc295cd1f9c3a85a487833034f5e95a.zip |
net-misc/r8168: Fix 8.044.02 against Linux 4.11, bug #618340
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'net-misc/r8168')
-rw-r--r-- | net-misc/r8168/files/r8168-8.044.02-linux-4.11.patch | 27 | ||||
-rw-r--r-- | net-misc/r8168/r8168-8.044.02.ebuild | 6 |
2 files changed, 32 insertions, 1 deletions
diff --git a/net-misc/r8168/files/r8168-8.044.02-linux-4.11.patch b/net-misc/r8168/files/r8168-8.044.02-linux-4.11.patch new file mode 100644 index 000000000000..ba1dd372dfab --- /dev/null +++ b/net-misc/r8168/files/r8168-8.044.02-linux-4.11.patch @@ -0,0 +1,27 @@ +diff a/src/r8168.h b/src/r8168.h +--- a/src/r8168.h 2017-01-11 14:19:18.000000000 +0800 ++++ b/src/r8168.h 2017-05-02 21:18:54.541652414 +0800 +@@ -36,6 +36,10 @@ + #include "r8168_realwow.h" + #include "r8168_fiber.h" + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) ++#include <linux/sched/signal.h> ++#endif ++ + #if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0) + #if defined(skb_vlan_tag_present) && !defined(vlan_tx_tag_present) + #define vlan_tx_tag_present skb_vlan_tag_present +diff a/src/r8168_n.c b/src/r8168_n.c +--- a/src/r8168_n.c 2017-01-11 14:18:43.000000000 +0800 ++++ b/src/r8168_n.c 2017-05-02 21:20:57.488644205 +0800 +@@ -25732,7 +25732,9 @@ + if (rtl8168_rx_vlan_skb(tp, desc, skb) < 0) + rtl8168_rx_skb(tp, skb); + ++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 10, 0)) + dev->last_rx = jiffies; ++#endif + RTLDEV->stats.rx_bytes += pkt_size; + RTLDEV->stats.rx_packets++; + } diff --git a/net-misc/r8168/r8168-8.044.02.ebuild b/net-misc/r8168/r8168-8.044.02.ebuild index c9db5561b3ad..8c730a06229a 100644 --- a/net-misc/r8168/r8168-8.044.02.ebuild +++ b/net-misc/r8168/r8168-8.044.02.ebuild @@ -14,10 +14,14 @@ KEYWORDS="~amd64 ~x86" MODULE_NAMES="r8168(net:${S}/src)" BUILD_TARGETS="modules" -CONFIG_CHECK="!R8169" +CONFIG_CHECK="!R8169" ERROR_R8169="${P} requires Realtek 8169 PCI Gigabit Ethernet adapter (CONFIG_R8169) to be DISABLED" +PATCHES=( + "${FILESDIR}"/${P}-linux-4.11.patch +) + pkg_setup() { linux-mod_pkg_setup BUILD_PARAMS="KERNELDIR=${KV_DIR}" |