mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
isert-scst: Build fix for older kernel versions (< 2.6.29)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6395 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -36,6 +36,8 @@
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/in.h>
|
||||
#include <linux/in6.h>
|
||||
|
||||
#include "iser.h"
|
||||
#include "iser_datamover.h"
|
||||
@@ -1305,8 +1307,8 @@ static int isert_cm_conn_req_handler(struct rdma_cm_id *cm_id,
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
|
||||
pr_info("iser accepted connection cm_id:%p "
|
||||
NIP6_FMT "->" NIP6_FMT "\n", cm_id,
|
||||
NIP6(((struct sockaddr_in6 *)&isert_conn->peer_addr)->sin6_addr.s_addr),
|
||||
NIP6(((struct sockaddr_in6 *)&isert_conn->self_addr)->sin6_addr.s_addr));
|
||||
NIP6(((struct sockaddr_in6 *)&isert_conn->peer_addr)->sin6_addr),
|
||||
NIP6(((struct sockaddr_in6 *)&isert_conn->self_addr)->sin6_addr));
|
||||
#else
|
||||
pr_info("iser accepted connection cm_id:%p "
|
||||
"%pI6->%pI6\n", cm_id,
|
||||
@@ -1638,7 +1640,7 @@ int isert_portal_listen(struct isert_portal *portal,
|
||||
pr_info("iser portal cm_id:%p listens on: "
|
||||
NIP6_FMT " %d\n",
|
||||
portal->cm_id,
|
||||
NIP6(((struct sockaddr_in6 *)sa)->sin6_addr.s_addr),
|
||||
NIP6(((struct sockaddr_in6 *)sa)->sin6_addr),
|
||||
(int)ntohs(((struct sockaddr_in6 *)sa)->sin6_port));
|
||||
#else
|
||||
pr_info("iser portal cm_id:%p listens on: "
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/in.h>
|
||||
#include <linux/in6.h>
|
||||
|
||||
#ifdef INSIDE_KERNEL_TREE
|
||||
#include <scst/iscsit_transport.h>
|
||||
@@ -435,7 +437,7 @@ static ssize_t isert_get_initiator_ip(struct iscsi_conn *conn,
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
|
||||
pos = scnprintf(buf, size,
|
||||
"[%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]",
|
||||
NIP6(((struct sockaddr_in6 *)&ss)->sin6_addr.s_addr));
|
||||
NIP6(((struct sockaddr_in6 *)&ss)->sin6_addr));
|
||||
#else
|
||||
pos = scnprintf(buf, size, "[%p6]",
|
||||
&((struct sockaddr_in6 *)&ss)->sin6_addr);
|
||||
|
||||
Reference in New Issue
Block a user