summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2015-04-13 11:55:42 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2015-04-16 06:39:23 +0000
commitc79d2b6836dc1c7223b90a9bb0af7940963ff0a5 (patch)
tree9f1e4cb2172ea9d1a6f20478aa8b034ff4cde736
parent09dd086e776aa4d1c2ce3abe0e3b74b298372141 (diff)
rdma:smoke failure in NetBSD if RDMA_OPTION_ID_REUSEADDR is not defined
By the change http://review.gluster.org/#/c/10014/, we only set reuseaddr option if the macro RDMA_OPTION_ID_REUSEADDR is defined in rdmacma.h . The variable optval is only used in the section where we use conditional compiling based on the macro. So if the macro is not defined, then compiler will throw a warning for optval. Change-Id: I162143c928e84b40c6fd6108d3aa5b045dd9de95 BUG: 1201484 Reviewed-on: http://review.gluster.org/10208 Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Sachin Pandit <spandit@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Raghavendra Bhat <raghavendra@redhat.com>
-rw-r--r--rpc/rpc-transport/rdma/src/rdma.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c
index 5d94d8ad9c7..2be88287fa7 100644
--- a/rpc/rpc-transport/rdma/src/rdma.c
+++ b/rpc/rpc-transport/rdma/src/rdma.c
@@ -4634,7 +4634,9 @@ gf_rdma_listen (rpc_transport_t *this)
int ret = 0;
gf_rdma_ctx_t *rdma_ctx = NULL;
char service[NI_MAXSERV], host[NI_MAXHOST];
+#if defined(RDMA_OPTION_ID_REUSEADDR)
int optval = 2;
+#endif
priv = this->private;
peer = &priv->peer;