From b4b41742a654b48778d3b9e83e39ee79a187b167 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Sat, 27 Oct 2018 14:21:53 +0200 Subject: [PATCH] - build fix for kernel 4.19 --- kernel-4.19.patch | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 kernel-4.19.patch diff --git a/kernel-4.19.patch b/kernel-4.19.patch new file mode 100644 index 0000000..4a06007 --- /dev/null +++ b/kernel-4.19.patch @@ -0,0 +1,29 @@ +--- lin_tape-3.0.33/lower.c.orig 2018-10-27 12:12:06.000000000 +0200 ++++ lin_tape-3.0.33/lower.c 2018-10-27 14:11:03.207396481 +0200 +@@ -276,8 +276,13 @@ + pfo_cmd->bufflen, local_raw_sense, pfo_cmd->timeout, + pfo_cmd->retries, pfo_cmd->flags, &pfo_cmd->resid_len); + #else ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,19,0) + pfo_cmd->bufflen, local_raw_sense, &local_sense_data, pfo_cmd->timeout, + pfo_cmd->retries, pfo_cmd->flags, 0, &pfo_cmd->resid_len); ++#else ++ pfo_cmd->bufflen, NULL, &local_sense_data, pfo_cmd->timeout, ++ pfo_cmd->retries, pfo_cmd->flags, 0, &pfo_cmd->resid_len); ++#endif + #endif + } else { + /* SCSI Command from user space */ +@@ -291,8 +296,12 @@ + scsi_device_put(sdev); + unlock_apfo_path(path_num); + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,19,0) + valid_sense = scsi_normalize_sense(local_raw_sense, + SCSI_SENSE_BUFFERSIZE, &local_sense_data); ++#else ++ valid_sense = scsi_sense_valid(&local_sense_data); ++#endif + /* Put the SCSI command results in the structure */ + pfo_cmd->errors = result; + pfo_cmd->scsi_status_code = result & 0xff; -- 2.43.0