commit 94351d48c8d6d683289d373cb051b5f3c56b4488
Author: Jan RÄ™korajski <[email protected]>
Date:   Sun Mar 10 18:17:46 2019 +0100

    - fix building with kernel 5.0

 kernel-5.0.patch | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 lin_tape.spec    |  2 ++
 2 files changed, 57 insertions(+)
---
diff --git a/lin_tape.spec b/lin_tape.spec
index c145d29..2eea2c1 100644
--- a/lin_tape.spec
+++ b/lin_tape.spec
@@ -27,6 +27,7 @@ Patch8:               kernel-4.15.patch
 Patch9:                kernel-4.17.patch
 Patch10:       kernel-4.19.patch
 Patch11:       linux-4.4.169.patch
+Patch12:       kernel-5.0.patch
 # System Storage, Tape systems, Tape drivers and software, Tape device drivers 
(Linux)
 URL:           http://www.ibm.com/support/fixcentral/
 BuildRequires: rpmbuild(macros) >= 1.701
@@ -85,6 +86,7 @@ compatible platforms.\
 %patch9 -p1
 %patch10 -p1
 %patch11 -p1
+%patch12 -p1
 
 install -p %{SOURCE1} .
 
diff --git a/kernel-5.0.patch b/kernel-5.0.patch
new file mode 100644
index 0000000..73ae7e3
--- /dev/null
+++ b/kernel-5.0.patch
@@ -0,0 +1,55 @@
+--- lin_tape-3.0.33/lin_tape_ioctl_tape.c~     2019-03-10 18:06:13.000000000 
+0100
++++ lin_tape-3.0.33/lin_tape_ioctl_tape.c      2019-03-10 18:11:48.544963300 
+0100
+@@ -23,6 +23,7 @@
+ #include "lin_tape_timeout_tape.h"
+ #include "ibmekm/inc/dd_event.h"
+ #include "lin_tape_scsi_tape.h"
++#include <linux/ktime.h>
+ 
+ /*****************************************************************************
+  *                                                                           *
+@@ -2825,7 +2826,16 @@
+       if(rc != STATUS_SUCCESS) goto EXIT_LABEL;
+ 
+       memset(tv, '\0', sizeof(struct timeval));
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
+       do_gettimeofday(tv);
++#else
++      struct timespec64 __now__;
++
++      ktime_get_real_ts64(&__now__);
++
++      tv->tv_sec = __now__.tv_sec,
++      tv->tv_usec = __now__.tv_nsec/1000,
++#endif
+ 
+       /* tv.sec in structure timeval is a "long" integer
+       * it has 4 bytes in 32-bit kernel, but 8 bytes in 64-bit kernel
+@@ -8843,7 +8853,16 @@
+ 
+       /* get time info to set TOD */
+       memset(tv, '\0', sizeof(struct timeval));
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
+       do_gettimeofday(tv);
++#else
++      struct timespec64 __now__;
++
++      ktime_get_real_ts64(&__now__);
++
++      tv->tv_sec = __now__.tv_sec,
++      tv->tv_usec = __now__.tv_nsec/1000,
++#endif
+ 
+       /* tv.sec in structure timeval is a "long" integer
+       * it has 4 bytes in 32-bit kernel, but 8 bytes in 64-bit kernel
+--- lin_tape-3.0.33/intercept.c~       2019-03-10 18:13:48.000000000 +0100
++++ lin_tape-3.0.33/intercept.c        2019-03-10 18:16:23.483059816 +0100
+@@ -1362,7 +1362,7 @@
+               /* Only for fo devices */
+               /* This 'if' must match the one above in create unique */
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
+-  #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0)
++  #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0) && LINUX_VERSION_CODE < 
KERNEL_VERSION(5,0,0)
+               sdev->request_queue = blk_alloc_queue_node(GFP_KERNEL, 
NUMA_NO_NODE, NULL);
+   #else
+               sdev->request_queue = blk_alloc_queue_node(GFP_KERNEL, 
NUMA_NO_NODE);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lin_tape.git/commitdiff/94351d48c8d6d683289d373cb051b5f3c56b4488

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to