From c75dcab46d718d0d51f11ccf8c4b56dd5d85a2e4 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 25 Mar 2014 16:38:25 +0000 Subject: [PATCH] iscsi-scst: Kernel 3.13 build fix (merge r5182 from trunk) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@5376 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/conn.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/iscsi-scst/kernel/conn.c b/iscsi-scst/kernel/conn.c index e563838fc..89bdbd07d 100644 --- a/iscsi-scst/kernel/conn.c +++ b/iscsi-scst/kernel/conn.c @@ -100,9 +100,12 @@ void conn_info_show(struct seq_file *seq, struct iscsi_session *session) snprintf(buf, sizeof(buf), "[%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]", NIP6(inet6_sk(sk)->daddr)); -#else +#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) snprintf(buf, sizeof(buf), "[%p6]", &inet6_sk(sk)->daddr); +#else + snprintf(buf, sizeof(buf), "[%p6]", + &sk->sk_v6_daddr); #endif break; default: @@ -164,8 +167,11 @@ 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 - pos = scnprintf(buf, size, "[%p6]", - &inet6_sk(sk)->daddr); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + pos = scnprintf(buf, size, "[%p6]", &inet6_sk(sk)->daddr); +#else + pos = scnprintf(buf, size, "[%p6]", &sk->sk_v6_daddr); +#endif #endif break; default: