From 2703ade89c79fa7b0bfeda44c3ea1f62fa1ee340 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 23 May 2014 07:36:50 +0000 Subject: [PATCH] RHEL 7 build fixes (merge r5543 from trunk) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@5544 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/conn.c | 3 ++- scst/src/scst_pres.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/iscsi-scst/kernel/conn.c b/iscsi-scst/kernel/conn.c index 89bdbd07d..8c4131c48 100644 --- a/iscsi-scst/kernel/conn.c +++ b/iscsi-scst/kernel/conn.c @@ -167,7 +167,8 @@ static ssize_t iscsi_get_initiator_ip(struct iscsi_conn *conn, "[%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]", NIP6(inet6_sk(sk)->daddr)); #else -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 7) pos = scnprintf(buf, size, "[%p6]", &inet6_sk(sk)->daddr); #else pos = scnprintf(buf, size, "[%p6]", &sk->sk_v6_daddr); diff --git a/scst/src/scst_pres.c b/scst/src/scst_pres.c index a1de77052..ab950f32b 100644 --- a/scst/src/scst_pres.c +++ b/scst/src/scst_pres.c @@ -586,7 +586,8 @@ static inline void scst_pr_vfs_unlink_and_put(struct nameidata *nd) #else static inline void scst_pr_vfs_unlink_and_put(struct path *path) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 7) vfs_unlink(path->dentry->d_parent->d_inode, path->dentry); #else vfs_unlink(path->dentry->d_parent->d_inode, path->dentry, NULL);