1 |
commit: e435be88f7d4567f89a3f2158b62336cda0801a5 |
2 |
Author: Martin Dummer <martin.dummer <AT> ts <DOT> fujitsu <DOT> com> |
3 |
AuthorDate: Sun Mar 24 10:36:22 2019 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 9 12:06:03 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e435be88 |
7 |
|
8 |
sys-block/rts_pstor: fix compilation issue. |
9 |
|
10 |
fix compile issue with kernel >=5.0. |
11 |
|
12 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
13 |
Closes: https://bugs.gentoo.org/680478 |
14 |
Closes: https://github.com/gentoo/gentoo/pull/11476 |
15 |
Signed-off-by: Martin Dummer <martin.dummer <AT> gmx.net> |
16 |
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org> |
17 |
|
18 |
.../rts_pstor/files/fix-compile-kernel-5.0.0.patch | 36 ++++++++++++++++++++++ |
19 |
.../rts_pstor/rts_pstor-1.10_p20160103.ebuild | 3 +- |
20 |
2 files changed, 38 insertions(+), 1 deletion(-) |
21 |
|
22 |
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 |
23 |
new file mode 100644 |
24 |
index 00000000000..7ea6ba6fd26 |
25 |
--- /dev/null |
26 |
+++ b/sys-block/rts_pstor/files/fix-compile-kernel-5.0.0.patch |
27 |
@@ -0,0 +1,36 @@ |
28 |
+--- a/rtsx.h |
29 |
++++ b/rtsx.h |
30 |
+@@ -81,6 +81,17 @@ |
31 |
+ pci_get_domain_bus_and_slot(0, (bus), (devfn)) |
32 |
+ #endif |
33 |
+ |
34 |
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) |
35 |
++static void do_gettimeofday(struct timeval *tv) |
36 |
++{ |
37 |
++ struct timespec64 now; |
38 |
++ |
39 |
++ ktime_get_real_ts64(&now); |
40 |
++ tv->tv_sec = now.tv_sec; |
41 |
++ tv->tv_usec = now.tv_nsec / 1000; |
42 |
++} |
43 |
++#endif |
44 |
++ |
45 |
+ /* |
46 |
+ * macros for easy use |
47 |
+ */ |
48 |
+--- a/rtsx.c |
49 |
++++ b/rtsx.c |
50 |
+@@ -300,11 +300,13 @@ |
51 |
+ |
52 |
+ .max_sectors = 240, |
53 |
+ |
54 |
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) |
55 |
+ /* merge commands... this seems to help performance, but |
56 |
+ * periodically someone should test to see which setting is more |
57 |
+ * optimal. |
58 |
+ */ |
59 |
+ .use_clustering = 1, |
60 |
++#endif |
61 |
+ |
62 |
+ |
63 |
+ .emulated = 1, |
64 |
|
65 |
diff --git a/sys-block/rts_pstor/rts_pstor-1.10_p20160103.ebuild b/sys-block/rts_pstor/rts_pstor-1.10_p20160103.ebuild |
66 |
index 73c7c69315d..e9b31fc3584 100644 |
67 |
--- a/sys-block/rts_pstor/rts_pstor-1.10_p20160103.ebuild |
68 |
+++ b/sys-block/rts_pstor/rts_pstor-1.10_p20160103.ebuild |
69 |
@@ -1,4 +1,4 @@ |
70 |
-# Copyright 2018 Gentoo Authors |
71 |
+# Copyright 2019 Gentoo Authors |
72 |
# Distributed under the terms of the GNU General Public License v2 |
73 |
|
74 |
EAPI=7 |
75 |
@@ -18,6 +18,7 @@ KEYWORDS="~amd64 ~x86" |
76 |
DEPEND="virtual/linux-sources" |
77 |
PATCHES=( |
78 |
"${FILESDIR}/rts_pstor-makefile.patch" |
79 |
+ "${FILESDIR}/fix-compile-kernel-5.0.0.patch" |
80 |
) |
81 |
S="${WORKDIR}/RTS5209-linux-driver-${GIT_COMMIT}" |