diff options
author | bz <bz@FreeBSD.org> | 2015-02-19 11:48:00 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2015-02-19 11:48:00 +0000 |
commit | 77d3bd281e96f63cfa5f2d2fe734b9d9149c939c (patch) | |
tree | e33da31d14eb330d03a95a95e554a8738bf51ce3 /sys/ofed/drivers/infiniband | |
parent | 0e84909e403ce8ea0564f729fb32130b4ca731a0 (diff) | |
download | FreeBSD-src-77d3bd281e96f63cfa5f2d2fe734b9d9149c939c.zip FreeBSD-src-77d3bd281e96f63cfa5f2d2fe734b9d9149c939c.tar.gz |
Try to unbreak NOIP and NOINET6 LINT builds after r278886
by placing appropriate #ifdefs around otherwise unused variables
or sections with functions called which are not available without
IPv6 support in the kernel.
Diffstat (limited to 'sys/ofed/drivers/infiniband')
-rw-r--r-- | sys/ofed/drivers/infiniband/core/cma.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/ofed/drivers/infiniband/core/cma.c b/sys/ofed/drivers/infiniband/core/cma.c index d2064b6..f1d26cc 100644 --- a/sys/ofed/drivers/infiniband/core/cma.c +++ b/sys/ofed/drivers/infiniband/core/cma.c @@ -2558,8 +2558,10 @@ int rdma_bind_addr(struct rdma_cm_id *id, struct sockaddr *addr) { struct rdma_id_private *id_priv; int ret; +#if defined(INET6) int ipv6only; size_t var_size = sizeof(int); +#endif if (addr->sa_family != AF_INET && addr->sa_family != AF_INET6) return -EAFNOSUPPORT; @@ -3222,10 +3224,13 @@ static void cma_set_mgid(struct rdma_id_private *id_priv, unsigned char mc_map[MAX_ADDR_LEN]; struct rdma_dev_addr *dev_addr = &id_priv->id.route.addr.dev_addr; struct sockaddr_in *sin = (struct sockaddr_in *) addr; +#if defined(INET6) struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) addr; +#endif if (cma_any_addr(addr)) { memset(mgid, 0, sizeof *mgid); +#if defined(INET6) } else if ((addr->sa_family == AF_INET6) && ((be32_to_cpu(sin6->sin6_addr.s6_addr32[0]) & 0xFFF0FFFF) == 0xFF10A01B)) { @@ -3236,6 +3241,7 @@ static void cma_set_mgid(struct rdma_id_private *id_priv, if (id_priv->id.ps == RDMA_PS_UDP) mc_map[7] = 0x01; /* Use RDMA CM signature */ *mgid = *(union ib_gid *) (mc_map + 4); +#endif } else { ip_ib_mc_map(sin->sin_addr.s_addr, dev_addr->broadcast, mc_map); if (id_priv->id.ps == RDMA_PS_UDP) |