summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Dummer <martin.dummer@ts.fujitsu.com>2019-03-24 11:36:22 +0100
committerPatrice Clement <monsieurp@gentoo.org>2019-04-09 14:06:03 +0200
commite435be88f7d4567f89a3f2158b62336cda0801a5 (patch)
treef642df1c9de462fcff3f1860f6e49d060aa99861 /sys-block
parentsys-cluster/teleport: remove v2.6.7. (diff)
downloadgentoo-e435be88f7d4567f89a3f2158b62336cda0801a5.tar.gz
gentoo-e435be88f7d4567f89a3f2158b62336cda0801a5.tar.bz2
gentoo-e435be88f7d4567f89a3f2158b62336cda0801a5.zip
sys-block/rts_pstor: fix compilation issue.
fix compile issue with kernel >=5.0. Package-Manager: Portage-2.3.62, Repoman-2.3.12 Closes: https://bugs.gentoo.org/680478 Closes: https://github.com/gentoo/gentoo/pull/11476 Signed-off-by: Martin Dummer <martin.dummer@gmx.net> Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'sys-block')
-rw-r--r--sys-block/rts_pstor/files/fix-compile-kernel-5.0.0.patch36
-rw-r--r--sys-block/rts_pstor/rts_pstor-1.10_p20160103.ebuild3
2 files changed, 38 insertions, 1 deletions
diff --git a/sys-block/rts_pstor/files/fix-compile-kernel-5.0.0.patch b/sys-block/rts_pstor/files/fix-compile-kernel-5.0.0.patch
new file mode 100644
index 000000000000..7ea6ba6fd26b
--- /dev/null
+++ b/sys-block/rts_pstor/files/fix-compile-kernel-5.0.0.patch
@@ -0,0 +1,36 @@
+--- a/rtsx.h
++++ b/rtsx.h
+@@ -81,6 +81,17 @@
+ pci_get_domain_bus_and_slot(0, (bus), (devfn))
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
++static void do_gettimeofday(struct timeval *tv)
++{
++ struct timespec64 now;
++
++ ktime_get_real_ts64(&now);
++ tv->tv_sec = now.tv_sec;
++ tv->tv_usec = now.tv_nsec / 1000;
++}
++#endif
++
+ /*
+ * macros for easy use
+ */
+--- a/rtsx.c
++++ b/rtsx.c
+@@ -300,11 +300,13 @@
+
+ .max_sectors = 240,
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
+ /* merge commands... this seems to help performance, but
+ * periodically someone should test to see which setting is more
+ * optimal.
+ */
+ .use_clustering = 1,
++#endif
+
+
+ .emulated = 1,
diff --git a/sys-block/rts_pstor/rts_pstor-1.10_p20160103.ebuild b/sys-block/rts_pstor/rts_pstor-1.10_p20160103.ebuild
index 73c7c69315d7..e9b31fc3584d 100644
--- a/sys-block/rts_pstor/rts_pstor-1.10_p20160103.ebuild
+++ b/sys-block/rts_pstor/rts_pstor-1.10_p20160103.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2018 Gentoo Authors
+# Copyright 2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -18,6 +18,7 @@ KEYWORDS="~amd64 ~x86"
DEPEND="virtual/linux-sources"
PATCHES=(
"${FILESDIR}/rts_pstor-makefile.patch"
+ "${FILESDIR}/fix-compile-kernel-5.0.0.patch"
)
S="${WORKDIR}/RTS5209-linux-driver-${GIT_COMMIT}"