Merge r7517 from trunk

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7769 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2018-11-04 17:03:38 +00:00
parent abdb80fe67
commit 7f173868dc

View File

@@ -196,14 +196,14 @@ static ssize_t iscsi_get_target_ip(struct iscsi_conn *conn,
switch (sk->sk_family) {
case AF_INET:
pos = scnprintf(buf, size,
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
"%u.%u.%u.%u", NIPQUAD(inet_sk(sk)->saddr));
#else
"%pI4", &inet_sk(sk)->inet_saddr);
#endif
break;
case AF_INET6:
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
pos = scnprintf(buf, size,
"[%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]",
NIP6(inet6_sk(sk)->saddr));