From 0880cbf0cf1751055ab4c42580626ca73c2702d0 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 23 May 2014 07:33:53 +0000 Subject: [PATCH] RHEL 7 build fixes git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5543 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/conn.c | 3 ++- scst/src/scst_lib.c | 3 ++- srpt/src/ib_srpt.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/iscsi-scst/kernel/conn.c b/iscsi-scst/kernel/conn.c index b07249022..6f02c9c98 100644 --- a/iscsi-scst/kernel/conn.c +++ b/iscsi-scst/kernel/conn.c @@ -178,7 +178,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_lib.c b/scst/src/scst_lib.c index afc92707a..ef3a7c111 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -9749,7 +9749,8 @@ void scst_vfs_unlink_and_put(struct nameidata *nd) #else void scst_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); diff --git a/srpt/src/ib_srpt.h b/srpt/src/ib_srpt.h index 135091311..6596c0634 100644 --- a/srpt/src/ib_srpt.h +++ b/srpt/src/ib_srpt.h @@ -51,7 +51,7 @@ #if defined(RHEL_MAJOR) && RHEL_MAJOR -0 == 5 #define vlan_dev_vlan_id(dev) (panic("RHEL 5 misses vlan_dev_vlan_id()"),0) #endif -#if defined(RHEL_MAJOR) +#if defined(RHEL_MAJOR) && RHEL_MAJOR -0 <= 6 #define __ethtool_get_settings(dev, cmd) (panic("RHEL misses __ethtool_get_settings()"),0) #endif #include