]> git.pld-linux.org Git - packages/lin_tape.git/blame - kernel-5.0.patch
- up to 3.0.52
[packages/lin_tape.git] / kernel-5.0.patch
CommitLineData
94351d48
JR
1--- lin_tape-3.0.33/lin_tape_ioctl_tape.c~ 2019-03-10 18:06:13.000000000 +0100
2+++ lin_tape-3.0.33/lin_tape_ioctl_tape.c 2019-03-10 18:11:48.544963300 +0100
3@@ -23,6 +23,7 @@
94351d48
JR
4 #include "ibmekm/inc/dd_event.h"
5 #include "lin_tape_scsi_tape.h"
dc1a7dc8 6 #include <linux/delay.h>
94351d48
JR
7+#include <linux/ktime.h>
8
9 /*****************************************************************************
10 * *
11@@ -2825,7 +2826,16 @@
12 if(rc != STATUS_SUCCESS) goto EXIT_LABEL;
13
14 memset(tv, '\0', sizeof(struct timeval));
15+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
16 do_gettimeofday(tv);
17+#else
18+ struct timespec64 __now__;
19+
20+ ktime_get_real_ts64(&__now__);
21+
22+ tv->tv_sec = __now__.tv_sec,
23+ tv->tv_usec = __now__.tv_nsec/1000,
24+#endif
25
26 /* tv.sec in structure timeval is a "long" integer
27 * it has 4 bytes in 32-bit kernel, but 8 bytes in 64-bit kernel
28@@ -8843,7 +8853,16 @@
29
30 /* get time info to set TOD */
31 memset(tv, '\0', sizeof(struct timeval));
32+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
33 do_gettimeofday(tv);
34+#else
35+ struct timespec64 __now__;
36+
37+ ktime_get_real_ts64(&__now__);
38+
39+ tv->tv_sec = __now__.tv_sec,
40+ tv->tv_usec = __now__.tv_nsec/1000,
41+#endif
42
43 /* tv.sec in structure timeval is a "long" integer
44 * it has 4 bytes in 32-bit kernel, but 8 bytes in 64-bit kernel
This page took 0.050269 seconds and 4 git commands to generate.