diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index bba8976b6..c9456fad2 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -1017,7 +1017,7 @@ static void iscsi_init_status_rsp(struct iscsi_cmnd *rsp, sg_init_table(sg, 2); sg_set_buf(&sg[0], &rsp->sense_hdr, sizeof(rsp->sense_hdr)); - sg_set_buf(&sg[1], sense_buf, sense_len); + sg_set_buf(&sg[1], (u8 *)sense_buf, sense_len); rsp->sense_hdr.length = cpu_to_be16(sense_len); @@ -3686,7 +3686,7 @@ static int iscsi_scsi_aen(struct scst_aen *aen) sg_init_table(sg, 2); sg_set_buf(&sg[0], &rsp->sense_hdr, sizeof(rsp->sense_hdr)); - sg_set_buf(&sg[1], sense, sense_len); + sg_set_buf(&sg[1], (u8 *)sense, sense_len); rsp->sense_hdr.length = cpu_to_be16(sense_len); rsp->pdu.datasize = sizeof(rsp->sense_hdr) + sense_len; diff --git a/iscsi-scst/kernel/session.c b/iscsi-scst/kernel/session.c index b03cffdab..953492276 100644 --- a/iscsi-scst/kernel/session.c +++ b/iscsi-scst/kernel/session.c @@ -426,7 +426,12 @@ static void iscsi_session_info_show(struct seq_file *seq, static int iscsi_session_seq_open(struct inode *inode, struct file *file) { int res; + +#if defined(RHEL_MAJOR) && RHEL_MAJOR -0 <= 5 + res = seq_open(file, (struct seq_operations *)&iscsi_seq_op); +#else res = seq_open(file, &iscsi_seq_op); +#endif if (!res) ((struct seq_file *)file->private_data)->private = iscsi_session_info_show; diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index cab5f587f..397976b3e 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -3013,7 +3013,11 @@ static int vdisk_unmap_file_range(struct scst_cmd *cmd, static int vdisk_unmap_range(struct scst_cmd *cmd, struct scst_vdisk_dev *virt_dev, uint64_t start_lba, uint32_t blocks) { +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 27) int res, err; +#else + int res; +#endif struct file *fd = virt_dev->fd; TRACE_ENTRY();